From 517bc500ed95a84fd2aadff34fdc14cb7965bc6b Mon Sep 17 00:00:00 2001 From: Ian White Date: Thu, 16 Oct 2008 12:02:16 +1100 Subject: Allow class methods to be sent (via #send) to association proxy (fix for bug introduced by 691aa20) [#1083] Signed-off-by: Pratik Naik --- activerecord/test/cases/associations/has_many_associations_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test') diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 1bc9c39c19..dada2d1603 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -1080,5 +1080,9 @@ class HasManyAssociationsTest < ActiveRecord::TestCase end end + def test_sending_new_to_association_proxy_should_have_same_effect_as_calling_new + clients_assoc = companies(:first_firm).clients + assert_equal clients_assoc.new.attributes, clients_assoc.send(:new).attributes + end end -- cgit v1.2.3