From 08c64bbd390d1ba6b44d29c5892693e219d20c5f Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 16 Nov 2010 14:28:09 -0800 Subject: super automatically passes on the implicit block --- .../lib/active_record/associations/association_collection.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 98507ad1d1..6090376bb8 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -408,11 +408,7 @@ module ActiveRecord end if @target.respond_to?(method) || (!@reflection.klass.respond_to?(method) && Class.respond_to?(method)) - if block_given? - super { |*block_args| yield(*block_args) } - else - super - end + super elsif @reflection.klass.scopes[method] @_named_scopes_cache ||= {} @_named_scopes_cache[method] ||= {} -- cgit v1.2.3