Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

optimize some code around merge

  • Loading branch information...
commit 056685373493b8431905202f1d7947759b783386 1 parent 456bd7b
@vipulnsward vipulnsward authored
View
2  activerecord/lib/active_record/associations/through_association.rb
@@ -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.