From 770fa81bbad8a77b41a1b5af3c926e6652acccd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Fri, 20 Jul 2012 14:10:25 -0300 Subject: Don't pass `:within` option to the i18n --- activemodel/lib/active_model/validations/inclusion.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activemodel/lib/active_model/validations/inclusion.rb') diff --git a/activemodel/lib/active_model/validations/inclusion.rb b/activemodel/lib/active_model/validations/inclusion.rb index c995e28d64..5a679e0423 100644 --- a/activemodel/lib/active_model/validations/inclusion.rb +++ b/activemodel/lib/active_model/validations/inclusion.rb @@ -9,7 +9,7 @@ module ActiveModel def validate_each(record, attribute, value) unless include?(record, value) - record.errors.add(attribute, :inclusion, options.except(:in).merge!(:value => value)) + record.errors.add(attribute, :inclusion, options.except(:in, :within).merge!(:value => value)) end end end -- cgit v1.2.3