aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/inclusion.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-06-21 12:17:24 +0200
committerJosé Valim <jose.valim@gmail.com>2010-06-21 12:17:24 +0200
commit0421fb7a913c1c8a7e07a395106bbc65e75e9d45 (patch)
tree1f8c19f62541dc51be6c072d2d0cc8f904188af9 /activemodel/lib/active_model/validations/inclusion.rb
parent26392c4ac57e27c63984d47c6326c13f502d5786 (diff)
downloadrails-0421fb7a913c1c8a7e07a395106bbc65e75e9d45.tar.gz
rails-0421fb7a913c1c8a7e07a395106bbc65e75e9d45.tar.bz2
rails-0421fb7a913c1c8a7e07a395106bbc65e75e9d45.zip
Refactor previous commit a bit [#4057 state:resolved]
Diffstat (limited to 'activemodel/lib/active_model/validations/inclusion.rb')
-rw-r--r--activemodel/lib/active_model/validations/inclusion.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb
index 863f4da0ff..049b093618 100644
--- a/activemodel/lib/active_model/validations/inclusion.rb
+++ b/activemodel/lib/active_model/validations/inclusion.rb
@@ -10,7 +10,7 @@ module ActiveModel
def validate_each(record, attribute, value)
unless options[:in].include?(value)
- record.errors.add(attribute, :inclusion, options.except(:in).merge(:value => value))
+ record.errors.add(attribute, :inclusion, options.except(:in).merge!(:value => value))
end
end
end