aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/validations/acceptance.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/validations/acceptance.rb')
-rw-r--r--activemodel/lib/active_model/validations/acceptance.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/acceptance.rb b/activemodel/lib/active_model/validations/acceptance.rb
index 77c401e0cc..99b8966def 100644
--- a/activemodel/lib/active_model/validations/acceptance.rb
+++ b/activemodel/lib/active_model/validations/acceptance.rb
@@ -9,10 +9,10 @@ module ActiveModel
def validate_each(record, attribute, value)
unless value == options[:accept]
- record.errors.add(attribute, :accepted, :default => options[:message])
+ record.errors.add(attribute, :accepted, options.except(:accept, :allow_nil))
end
end
-
+
def setup(klass)
# Note: instance_methods.map(&:to_s) is important for 1.9 compatibility
# as instance_methods returns symbols unlike 1.8 which returns strings.