diff options
Diffstat (limited to 'activerecord/lib/active_record/relation/merger.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/merger.rb | 8 |
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 9cbcf61b3e..10e4779ca4 100644 --- a/activerecord/lib/active_record/relation/merger.rb +++ b/activerecord/lib/active_record/relation/merger.rb @@ -120,9 +120,7 @@ module ActiveRecord joins_dependency = other.joins_values.map do |join| case join when Hash, Symbol, Array - ActiveRecord::Associations::JoinDependency.new( - other.klass, other.table, join - ) + other.send(:construct_join_dependency, join) else join end @@ -141,9 +139,7 @@ module ActiveRecord joins_dependency = other.left_outer_joins_values.map do |join| case join when Hash, Symbol, Array - ActiveRecord::Associations::JoinDependency.new( - other.klass, other.table, join - ) + other.send(:construct_join_dependency, join) else join end |