diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/association_collection.rb | 6 | ||||
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index d400a5c772..359e27de3b 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -161,9 +161,9 @@ module ActiveRecord if @target.respond_to?(method) || (!@reflection.klass.respond_to?(method) && Class.respond_to?(method)) super { |*block_args| yield(*block_args) if block_given? } else - @reflection.klass.send(:with_scope, construct_scope) { - @reflection.klass.send(method, *args) { |*block_args| yield(*block_args) if block_given? } - } + @reflection.klass.send(:with_scope, construct_scope) do + @reflection.klass.send(method, *args) { |*block_args| yield(*block_args) if block_given? } + end end end diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index 23931bcda2..81ec428d34 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -132,9 +132,9 @@ module ActiveRecord if @target.respond_to?(method) || (!@reflection.klass.respond_to?(method) && Class.respond_to?(method)) super { |*block_args| yield(*block_args) if block_given? } else - @reflection.klass.send(:with_scope, construct_scope) { - @reflection.klass.send(method, *args) { |*block_args| yield(*block_args) if block_given? } - } + @reflection.klass.send(:with_scope, construct_scope) do + @reflection.klass.send(method, *args) { |*block_args| yield(*block_args) if block_given? } + end end end |