Skip to content
Browse files

Missing object for comparison in ActiveModel::EachValidator example c…

…ode.
  • Loading branch information...
1 parent 92f4cca commit 017840beb851ac425b493f912e6a41dde072a6a5 @treybean treybean committed with fxn
Showing with 1 addition and 1 deletion.
  1. +1 −1 activemodel/lib/active_model/validations/validates.rb
View
2 activemodel/lib/active_model/validations/validates.rb
@@ -48,7 +48,7 @@ module ClassMethods
#
# class TitleValidator < ActiveModel::EachValidator
# def validate_each(record, attribute, value)
- # record.errors[attribute] << "must start with 'the'" unless =~ /^the/i
+ # record.errors[attribute] << "must start with 'the'" unless value =~ /^the/i
# end
# end
#

0 comments on commit 017840b

Please sign in to comment.
Something went wrong with that request. Please try again.