diff options
author | Xavier Noria <fxn@hashref.com> | 2011-02-21 11:37:08 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2011-02-21 11:37:08 +0100 |
commit | b481574a33764e2db1caf01c233a9c9ac9723780 (patch) | |
tree | ff621c47d30cc38f9d6cfeec2bb9188b5f8b7ebf /activemodel/lib/active_model/validations/numericality.rb | |
parent | 9297027e082c69e590fc090132cee495ce0fc4b1 (diff) | |
download | rails-b481574a33764e2db1caf01c233a9c9ac9723780.tar.gz rails-b481574a33764e2db1caf01c233a9c9ac9723780.tar.bz2 rails-b481574a33764e2db1caf01c233a9c9ac9723780.zip |
copy-edits 8d96b89
Diffstat (limited to 'activemodel/lib/active_model/validations/numericality.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/numericality.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index 7b155bb7f7..ae576462e6 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -93,7 +93,9 @@ module ActiveModel # # Configuration options: # * <tt>:message</tt> - A custom error message (default is: "is not a number"). - # * <tt>:on</tt> - Specifies the context where this validation is active (e.g. <tt>:on => :create</tt> or <tt>:on => :special_rules</tt>) + # * <tt>:on</tt> - Specifies when this validation is active. Runs in all + # validation contexts by default (+nil+), other options are <tt>:create</tt> + # and <tt>:update</tt>. # * <tt>:only_integer</tt> - Specifies whether the value has to be an integer, e.g. an integral value (default is +false+). # * <tt>:allow_nil</tt> - Skip validation if attribute is +nil+ (default is +false+). Notice that for fixnum and float columns empty strings are converted to +nil+. # * <tt>:greater_than</tt> - Specifies the value must be greater than the supplied value. |