diff options
Diffstat (limited to 'activemodel/lib/active_model/validations/presence.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/presence.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/presence.rb b/activemodel/lib/active_model/validations/presence.rb index 28c4640b17..3bfd6f15d1 100644 --- a/activemodel/lib/active_model/validations/presence.rb +++ b/activemodel/lib/active_model/validations/presence.rb @@ -26,8 +26,7 @@ module ActiveModel # # Configuration options: # * <tt>message</tt> - A custom error message (default is: "can't be blank"). - # * <tt>on</tt> - Specifies when this validation is active (default is <tt>:save</tt>, other options <tt>:create</tt>, - # <tt>:update</tt>). + # * <tt>:on</tt> - Specifies the context where this validation is active (e.g. <tt>:on => :create</tt> or <tt>:on => :special_rules</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 method, proc or string should return or evaluate to a true or false value. |