Browse files

fixing validates_with docs

  • Loading branch information...
1 parent f94567a commit a9e66c62e987e163cb80cd1dd71c1a2d4c7ce2b7 Francesco Rodriguez committed May 16, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 activemodel/lib/active_model/validations/with.rb
View
10 activemodel/lib/active_model/validations/with.rb
@@ -62,8 +62,8 @@ module ClassMethods
# <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 ClassMethods
# 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 @@ def validates_with(*args, &block)
# 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|

0 comments on commit a9e66c6

Please sign in to comment.