mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #10049 from vipulnsward/optimize_around_merge_v1
optimize some code around merge
This commit is contained in:
commit
db924e1257
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue