diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-05-31 17:03:40 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-05-31 17:03:40 -0700 |
commit | cb59c93de06421c4c7f04c8abefa1a0f69c91099 (patch) | |
tree | 997e7507afb4a4f1612e976200434beb530b13fa /activerecord/lib | |
parent | f9db7695fe3c148c8d1077f1564e5b94d126b83b (diff) | |
parent | ef21e013338461f33bf85f5cf6edd84b5ce9b6fe (diff) | |
download | rails-cb59c93de06421c4c7f04c8abefa1a0f69c91099.tar.gz rails-cb59c93de06421c4c7f04c8abefa1a0f69c91099.tar.bz2 rails-cb59c93de06421c4c7f04c8abefa1a0f69c91099.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index 0e150bddb2..c97aafb126 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -692,7 +692,7 @@ module ActiveRecord raise(ArgumentError, "A regular expression must be supplied as the :with option of the configuration hash") unless configuration[:with].is_a?(Regexp) validates_each(attr_names, configuration) do |record, attr_name, value| - record.errors.add(attr_name, configuration[:message]) unless value.to_s =~ configuration[:with] + record.errors.add(attr_name, configuration[:message] % value) unless value.to_s =~ configuration[:with] end end |