aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/merger.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/relation/merger.rb')
-rw-r--r--activerecord/lib/active_record/relation/merger.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/relation/merger.rb b/activerecord/lib/active_record/relation/merger.rb
index 25510d4a57..9cbcf61b3e 100644
--- a/activerecord/lib/active_record/relation/merger.rb
+++ b/activerecord/lib/active_record/relation/merger.rb
@@ -117,13 +117,11 @@ module ActiveRecord
if other.klass == relation.klass
relation.joins!(*other.joins_values)
else
- alias_tracker = nil
joins_dependency = other.joins_values.map do |join|
case join
when Hash, Symbol, Array
- alias_tracker ||= other.alias_tracker
ActiveRecord::Associations::JoinDependency.new(
- other.klass, other.table, join, alias_tracker
+ other.klass, other.table, join
)
else
join
@@ -140,13 +138,11 @@ module ActiveRecord
if other.klass == relation.klass
relation.left_outer_joins!(*other.left_outer_joins_values)
else
- alias_tracker = nil
joins_dependency = other.left_outer_joins_values.map do |join|
case join
when Hash, Symbol, Array
- alias_tracker ||= other.alias_tracker
ActiveRecord::Associations::JoinDependency.new(
- other.klass, other.table, join, alias_tracker
+ other.klass, other.table, join
)
else
join