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/lib/active_record/associations/association_collection.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/associations/association_collection.rb') diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 463de9d819..09a80be266 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -320,6 +320,10 @@ module ActiveRecord exists?(record) end + def proxy_respond_to?(method) + super || @reflection.klass.respond_to?(method) + end + protected def construct_find_options!(options) end -- cgit v1.2.3