diff options
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index bc2f359c65..3c44296d8c 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -1154,8 +1154,9 @@ module ActiveRecord end def method_missing(method, *args, &block) - if scope.respond_to?(method) - scope.public_send(method, *args, &block) + if scope.respond_to?(method) && scope.extending_values.any? + extend(*scope.extending_values) + public_send(method, *args, &block) else super end |