1
0
Fork 0
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:
Rafael Mendonça França 2013-04-03 07:52:52 -07:00
commit db924e1257

View file

@ -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)
)