aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2012-09-09 17:38:47 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2012-09-09 17:38:47 +0530
commitcb524dc1d7525a26ecea8cf049757e530f0d4026 (patch)
tree3a2d8727e97c67e37a357c1cf180e9ca17cff28b /activemodel
parent6107407e66aa68cf269ec00b64d7ab3623465b97 (diff)
parent2db79dc9ea0b623c6d76b72e85f58efd63b50e08 (diff)
downloadrails-cb524dc1d7525a26ecea8cf049757e530f0d4026.tar.gz
rails-cb524dc1d7525a26ecea8cf049757e530f0d4026.tar.bz2
rails-cb524dc1d7525a26ecea8cf049757e530f0d4026.zip
Merge branch 'master' of github.com:lifo/docrails
Conflicts: activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/validations/validates.rb6
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)