diff options
author | Anatoly Makarevich <makaroni4@gmail.com> | 2012-09-07 14:56:23 +0400 |
---|---|---|
committer | Anatoly Makarevich <makaroni4@gmail.com> | 2012-09-07 14:56:23 +0400 |
commit | fce0d088a591d7254fcda8e45683a43eff508957 (patch) | |
tree | de657ea05b9fb274534b344720aef19b7e8cd4ff /activemodel | |
parent | bf15169c483c087c01dae602fc1534caa54e56dd (diff) | |
download | rails-fce0d088a591d7254fcda8e45683a43eff508957.tar.gz rails-fce0d088a591d7254fcda8e45683a43eff508957.tar.bz2 rails-fce0d088a591d7254fcda8e45683a43eff508957.zip |
Added forgotten :message option to ActiveModel validates documentation
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/validations/validates.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index eb6e604851..03046a543a 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -94,10 +94,10 @@ module ActiveModel # validates :token, uniqueness: true, strict: TokenGenerationException # # - # Finally, the options +:if+, +:unless+, +:on+, +:allow_blank+, +:allow_nil+ - # and +:strict+ can be given to one specific validator, as a hash: + # Finally, the options +:if+, +:unless+, +:on+, +:allow_blank+, +:allow_nil+, +:strict+ + # and +:message+ can be given to one specific validator, as a hash: # - # validates :password, presence: { if: :password_required? }, confirmation: true + # validates :password, presence: { if: :password_required?, message: 'is forgotten.' }, confirmation: true def validates(*attributes) defaults = attributes.extract_options!.dup validations = defaults.slice!(*_validates_default_keys) |