aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-05-16 08:56:31 -0500
committerFrancesco Rodriguez <lrodriguezsanc@gmail.com>2012-05-16 08:56:31 -0500
commita9e66c62e987e163cb80cd1dd71c1a2d4c7ce2b7 (patch)
tree0df1c8faf0056e318a1acd77cd21d20fb57aa8af /activemodel/lib/active_model
parentf94567a2b8129af28fa328e8f71186d9ea9b5aac (diff)
downloadrails-a9e66c62e987e163cb80cd1dd71c1a2d4c7ce2b7.tar.gz
rails-a9e66c62e987e163cb80cd1dd71c1a2d4c7ce2b7.tar.bz2
rails-a9e66c62e987e163cb80cd1dd71c1a2d4c7ce2b7.zip
fixing validates_with docs
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/validations/with.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/activemodel/lib/active_model/validations/with.rb b/activemodel/lib/active_model/validations/with.rb
index 991c5f7b82..66cc9daa2c 100644
--- a/activemodel/lib/active_model/validations/with.rb
+++ b/activemodel/lib/active_model/validations/with.rb
@@ -62,8 +62,8 @@ module ActiveModel
# <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.
# * <tt>:strict</tt> - Specifies whether validation should be strict.
- # See <tt>ActiveModel::Validation#validates!</tt> for more information
-
+ # See <tt>ActiveModel::Validation#validates!</tt> for more information.
+ #
# If you pass any additional configuration options, they will be passed
# to the class and available as <tt>options</tt>:
#
@@ -77,7 +77,6 @@ module ActiveModel
# options[:my_custom_key] # => "my custom value"
# end
# end
- #
def validates_with(*args, &block)
options = args.extract_options!
args.each do |klass|
@@ -128,12 +127,11 @@ module ActiveModel
# Standard configuration options (:on, :if and :unless), which are
# available on the class version of +validates_with+, should instead be
# placed on the +validates+ method as these are applied and tested
- # in the callback
+ # in the callback.
#
# If you pass any additional configuration options, they will be passed
# to the class and available as +options+, please refer to the
- # class version of this method for more information
- #
+ # class version of this method for more information.
def validates_with(*args, &block)
options = args.extract_options!
args.each do |klass|