aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/exclusion.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/validations/exclusion.rb')
-rw-r--r--activemodel/lib/active_model/validations/exclusion.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/exclusion.rb b/activemodel/lib/active_model/validations/exclusion.rb
index 2ee78f5dd2..da4c84fbd6 100644
--- a/activemodel/lib/active_model/validations/exclusion.rb
+++ b/activemodel/lib/active_model/validations/exclusion.rb
@@ -8,7 +8,7 @@ module ActiveModel
def validate_each(record, attribute, value)
return unless options[:in].include?(value)
- record.errors.add(attribute, :exclusion, :default => options[:message], :value => value)
+ record.errors.add(attribute, :exclusion, options.merge(:value => value))
end
end