Skip to content
Browse files

optimize some code around merge

  • Loading branch information...
1 parent 456bd7b commit 056685373493b8431905202f1d7947759b783386 @vipulnsward vipulnsward committed Apr 2, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations/through_association.rb
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)
)

0 comments on commit 0566853

Please sign in to comment.
Something went wrong with that request. Please try again.