diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-03 07:52:52 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-04-03 07:52:52 -0700 |
commit | db924e1257f37dff441fee7c6e2bbd8ba382d7a6 (patch) | |
tree | 139cb4ed4f37e95ab5a58dd1640a498149db2ebd /activerecord/lib/active_record/associations | |
parent | b3efea8a6de1d7c4226c2781091079a6a3bef63f (diff) | |
parent | 056685373493b8431905202f1d7947759b783386 (diff) | |
download | rails-db924e1257f37dff441fee7c6e2bbd8ba382d7a6.tar.gz rails-db924e1257f37dff441fee7c6e2bbd8ba382d7a6.tar.bz2 rails-db924e1257f37dff441fee7c6e2bbd8ba382d7a6.zip |
Merge pull request #10049 from vipulnsward/optimize_around_merge_v1
optimize some code around merge
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/through_association.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/through_association.rb b/activerecord/lib/active_record/associations/through_association.rb index 43520142bf..35f29b37a2 100644 --- a/activerecord/lib/active_record/associations/through_association.rb +++ b/activerecord/lib/active_record/associations/through_association.rb @@ -14,7 +14,7 @@ module ActiveRecord def target_scope scope = super chain[1..-1].each do |reflection| - scope = scope.merge( + scope.merge!( reflection.klass.all.with_default_scope. except(:select, :create_with, :includes, :preload, :joins, :eager_load) ) |