aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/visitors/join_sql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/visitors/join_sql.rb')
-rw-r--r--lib/arel/visitors/join_sql.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/visitors/join_sql.rb b/lib/arel/visitors/join_sql.rb
index 95b27b4476..0353d687eb 100644
--- a/lib/arel/visitors/join_sql.rb
+++ b/lib/arel/visitors/join_sql.rb
@@ -9,6 +9,10 @@ module Arel
# This visitor is used in SelectManager#join_sql and is for backwards
# compatibility with Arel V1.0
class JoinSql < Arel::Visitors::ToSql
+ def visit_Arel_Nodes_SelectCore o
+ o.froms.grep(Nodes::Join).map { |x| visit x }.join ', '
+ end
+
def visit_Arel_Nodes_OuterJoin o
"OUTER JOIN #{visit o.right} #{visit o.constraint}"
end