diff options
author | Vipul A M <vipulnsward@gmail.com> | 2013-04-02 21:06:18 +0530 |
---|---|---|
committer | Vipul A M <vipulnsward@gmail.com> | 2013-04-03 20:18:49 +0530 |
commit | 056685373493b8431905202f1d7947759b783386 (patch) | |
tree | a5152900cf89e8e028b0c2ca749efeb72f23e241 | |
parent | 456bd7bfade62c6057649fb57a254fa931276470 (diff) | |
download | rails-056685373493b8431905202f1d7947759b783386.tar.gz rails-056685373493b8431905202f1d7947759b783386.tar.bz2 rails-056685373493b8431905202f1d7947759b783386.zip |
optimize some code around merge
-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) ) |