From 93898b389bafebc4d1b30a95330b4bb7d000c92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 8 Jan 2010 23:50:24 +0100 Subject: Ensure new validates works with uniqueness validator. --- activerecord/lib/active_record/validations/associated.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/validations/associated.rb') diff --git a/activerecord/lib/active_record/validations/associated.rb b/activerecord/lib/active_record/validations/associated.rb index 66b78682ad..e41635134c 100644 --- a/activerecord/lib/active_record/validations/associated.rb +++ b/activerecord/lib/active_record/validations/associated.rb @@ -40,8 +40,7 @@ module ActiveRecord # not occur (e.g. :unless => :skip_validation, or :unless => Proc.new { |user| user.signup_step <= 2 }). The # method, proc or string should return or evaluate to a true or false value. def validates_associated(*attr_names) - options = attr_names.extract_options! - validates_with AssociatedValidator, options.merge(:attributes => attr_names) + validates_with AssociatedValidator, _merge_attributes(attr_names) end end end -- cgit v1.2.3