From 4cc5917dce83fb841ac78b250ef3d1024168eb1e Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Tue, 7 Jul 2015 14:39:58 +0200 Subject: docs, clarify the meanaing of return values from validation methods. [ci skip] Closes #20792. Custom validation methods are implemented in terms of callbacks. The `validate` callback chain can't be halted using return values of individual callbacks. --- guides/source/active_record_validations.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'guides') diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 7932853c11..71ca7a0f66 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -965,8 +965,9 @@ own custom validators. You can also create methods that verify the state of your models and add messages to the `errors` collection when they are invalid. You must then -register these methods by using the `validate` class method, passing in the -symbols for the validation methods' names. +register these methods by using the `validate` +([API](http://api.rubyonrails.org/classes/ActiveModel/Validations/ClassMethods.html#method-i-validate)) +class method, passing in the symbols for the validation methods' names. You can pass more than one symbol for each class method and the respective validations will be run in the same order as they were registered. -- cgit v1.2.3