aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2010-01-22 20:14:37 +0530
committerPratik Naik <pratiknaik@gmail.com>2010-01-22 20:14:37 +0530
commit4afd9702fe111a5cbaa0d9572e7661c90b188d49 (patch)
tree635dd9cd0d93f5feb4421af1a84f1bcc73d70ede /activerecord/lib/active_record
parentee8c006dac7d76f79fb43df97a4ab8a2ae87b8b2 (diff)
downloadrails-4afd9702fe111a5cbaa0d9572e7661c90b188d49.tar.gz
rails-4afd9702fe111a5cbaa0d9572e7661c90b188d49.tar.bz2
rails-4afd9702fe111a5cbaa0d9572e7661c90b188d49.zip
Relation should respond to class methods
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/relation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index fa99e3f891..1a96cdad17 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -32,7 +32,7 @@ module ActiveRecord
end
def respond_to?(method, include_private = false)
- return true if arel.respond_to?(method, include_private) || Array.method_defined?(method)
+ return true if arel.respond_to?(method, include_private) || Array.method_defined?(method) || @klass.respond_to?(method, include_private)
if match = DynamicFinderMatch.match(method)
return true if @klass.send(:all_attributes_exists?, match.attribute_names)