diff options
author | Robin Dupret <robin.dupret@gmail.com> | 2017-05-21 21:34:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-21 21:34:47 +0200 |
commit | 0cbb130cf56812328f8aad305f2ef30c83ea33ad (patch) | |
tree | 31cd062e0e626ef978dfaadf4d6c1634ed4b985c /activemodel/lib/active_model/validations.rb | |
parent | 36d53f557d6478cd47ca5134468b70d8a1303664 (diff) | |
parent | 4f3955657736796664aa8d6f6d149ef9b213b058 (diff) | |
download | rails-0cbb130cf56812328f8aad305f2ef30c83ea33ad.tar.gz rails-0cbb130cf56812328f8aad305f2ef30c83ea33ad.tar.bz2 rails-0cbb130cf56812328f8aad305f2ef30c83ea33ad.zip |
Merge pull request #29072 from dixpac/dixpac/add_documentation_for_validate_and_callback_order_of_execution
Improving docs for callbacks execution order [ci skip]
Diffstat (limited to 'activemodel/lib/active_model/validations.rb')
-rw-r--r-- | activemodel/lib/active_model/validations.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index d460068830..9fcde45167 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -147,6 +147,9 @@ module ActiveModel # or <tt>unless: Proc.new { |user| user.signup_step <= 2 }</tt>). The # method, proc or string should return or evaluate to a +true+ or +false+ # value. + # + # NOTE: Calling +validate+ multiple times on the same method will overwrite previous definitions. + # def validate(*args, &block) options = args.extract_options! |