From fce0d088a591d7254fcda8e45683a43eff508957 Mon Sep 17 00:00:00 2001 From: Anatoly Makarevich Date: Fri, 7 Sep 2012 14:56:23 +0400 Subject: Added forgotten :message option to ActiveModel validates documentation --- activemodel/lib/active_model/validations/validates.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activemodel') 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) -- cgit v1.2.3