diff options
Diffstat (limited to 'lib/arel/relations/join.rb')
-rw-r--r-- | lib/arel/relations/join.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/relations/join.rb b/lib/arel/relations/join.rb index 2dd3555bac..8e29f0492b 100644 --- a/lib/arel/relations/join.rb +++ b/lib/arel/relations/join.rb @@ -25,7 +25,7 @@ module Arel join_sql, relation2.externalize.table_sql(formatter), ("ON" unless predicates.blank?), - (predicates + relation2.externalize.selects).collect { |p| p.bind(environment).to_sql }.join(' AND ') + (predicates + relation2.externalize.selects).collect { |p| p.bind(environment).to_sql(Sql::WhereClause.new(environment)) }.join(' AND ') ].compact.join(" ") [relation1.joins(environment), this_join, relation2.joins(environment)].compact.join(" ") end |