Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #10049 from vipulnsward/optimize_around_merge_v1

optimize some code around merge
  • Loading branch information...
commit db924e1257f37dff441fee7c6e2bbd8ba382d7a6 2 parents b3efea8 + 0566853
Rafael Mendonça França rafaelfranca authored
2  activerecord/lib/active_record/associations/through_association.rb
View
@@ -14,7 +14,7 @@ module ThroughAssociation #:nodoc:
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)
)
Please sign in to comment.
Something went wrong with that request. Please try again.