aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/visitors/to_sql.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/visitors/to_sql.rb')
-rw-r--r--lib/arel/visitors/to_sql.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb
index 3ed80c8f06..6aaaa19e6e 100644
--- a/lib/arel/visitors/to_sql.rb
+++ b/lib/arel/visitors/to_sql.rb
@@ -427,7 +427,8 @@ module Arel
end
def visit_Arel_SelectManager o, collector
- collector << "(#{o.to_sql.rstrip})"
+ collector << '('
+ visit(o.ast, collector) << ')'
end
def visit_Arel_Nodes_Ascending o, collector