diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-16 14:28:09 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-11-16 14:28:19 -0800 |
commit | 08c64bbd390d1ba6b44d29c5892693e219d20c5f (patch) | |
tree | c11465c8b5824eeed59dca1b6224f98708b3ddd3 /activerecord/lib/active_record | |
parent | 05320e3788a1be19956e7caa822484b816e11366 (diff) | |
download | rails-08c64bbd390d1ba6b44d29c5892693e219d20c5f.tar.gz rails-08c64bbd390d1ba6b44d29c5892693e219d20c5f.tar.bz2 rails-08c64bbd390d1ba6b44d29c5892693e219d20c5f.zip |
super automatically passes on the implicit block
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 6 |
1 files changed, 1 insertions, 5 deletions
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] ||= {} |