diff options
author | Xavier Noria <fxn@hashref.com> | 2011-05-25 22:48:47 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-05-25 22:48:47 +0200 |
commit | 00e1d0832e1242fe41cf43490b0a3a21a40f3c26 (patch) | |
tree | 06d3fcf35727a37f78885fc63fe15ff265aa309a /activemodel/lib/active_model/validations/inclusion.rb | |
parent | d25b7c2eeefff3a0abf7b532c10ce25a71d0fba2 (diff) | |
parent | 03f418370a4266e414ff32706381bb2b60baadfc (diff) | |
download | rails-00e1d0832e1242fe41cf43490b0a3a21a40f3c26.tar.gz rails-00e1d0832e1242fe41cf43490b0a3a21a40f3c26.tar.bz2 rails-00e1d0832e1242fe41cf43490b0a3a21a40f3c26.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
actionmailer/lib/action_mailer/base.rb
activesupport/lib/active_support/core_ext/kernel/requires.rb
Diffstat (limited to 'activemodel/lib/active_model/validations/inclusion.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/inclusion.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index d32aebeb88..bfb65d2f3f 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -54,10 +54,10 @@ module ActiveModel # validation contexts by default (+nil+), other options are <tt>:create</tt> # and <tt>:update</tt>. # * <tt>:if</tt> - Specifies a method, proc or string to call to determine if the validation should - # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The + # occur (e.g. <tt>:if => :allow_validation</tt>, or <tt>:if => Proc.new { |user| user.signup_step > 2 }</tt>). The # method, proc or string should return or evaluate to a true or false value. # * <tt>:unless</tt> - Specifies a method, proc or string to call to determine if the validation should - # not occur (e.g. <tt>:unless => :skip_validation</tt>, or <tt>:unless => Proc.new { |user| user.signup_step <= 2 }</tt>). The + # not occur (e.g. <tt>:unless => :skip_validation</tt>, 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. def validates_inclusion_of(*attr_names) validates_with InclusionValidator, _merge_attributes(attr_names) |