diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index c6cd8891e3..3c7533ea48 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -67,15 +67,10 @@ module ActiveRecord end def respond_to?(method, include_private = false) - 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) - elsif match = DynamicScopeMatch.match(method) - return true if @klass.send(:all_attributes_exists?, match.attribute_names) - else + arel.respond_to?(method, include_private) || + Array.method_defined?(method) || + @klass.respond_to?(method, include_private) || super - end end def to_a |