aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_collection.rb
diff options
context:
space:
mode:
authorIan White <ian.w.white@gmail.com>2008-10-16 12:02:16 +1100
committerPratik Naik <pratiknaik@gmail.com>2008-10-16 10:41:48 +0200
commit517bc500ed95a84fd2aadff34fdc14cb7965bc6b (patch)
tree5a637db5f8101ec4ac0e7b1044d6027935a7bfe9 /activerecord/lib/active_record/associations/association_collection.rb
parent09c1718198c58d2e14d267cbd771b4853b311da1 (diff)
downloadrails-517bc500ed95a84fd2aadff34fdc14cb7965bc6b.tar.gz
rails-517bc500ed95a84fd2aadff34fdc14cb7965bc6b.tar.bz2
rails-517bc500ed95a84fd2aadff34fdc14cb7965bc6b.zip
Allow class methods to be sent (via #send) to association proxy (fix for bug introduced by 691aa20) [#1083]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/associations/association_collection.rb')
-rw-r--r--activerecord/lib/active_record/associations/association_collection.rb4
1 files changed, 4 insertions, 0 deletions
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