diff options
author | evgenim <qrrrrx@gmail.com> | 2015-03-15 21:52:54 +0300 |
---|---|---|
committer | evgenim <qrrrrx@gmail.com> | 2015-03-16 00:34:31 +0300 |
commit | 956b40e93492b147e239d25b502148c9070ffa9d (patch) | |
tree | ebaf2fa8f480d26478ba377c28a27bc3452b0ffc /lib/arel/visitors | |
parent | b91dcb23af5917d8a62afc8a5a72780aaf11f64b (diff) | |
download | rails-956b40e93492b147e239d25b502148c9070ffa9d.tar.gz rails-956b40e93492b147e239d25b502148c9070ffa9d.tar.bz2 rails-956b40e93492b147e239d25b502148c9070ffa9d.zip |
Fix visit_Arel_Nodes_FullOuterJoin and visit_Arel_Nodes_RightOuterJoin to make them work with collectors.
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index ba176a552c..6f72fdfb0e 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -572,8 +572,11 @@ module Arel visit o.left, collector end - def visit_Arel_Nodes_FullOuterJoin o - "FULL OUTER JOIN #{visit o.left} #{visit o.right}" + def visit_Arel_Nodes_FullOuterJoin o, collector + collector << "FULL OUTER JOIN " + collector = visit o.left, collector + collector << SPACE + visit o.right, collector end def visit_Arel_Nodes_OuterJoin o, collector @@ -583,8 +586,11 @@ module Arel visit o.right, collector end - def visit_Arel_Nodes_RightOuterJoin o - "RIGHT OUTER JOIN #{visit o.left} #{visit o.right}" + def visit_Arel_Nodes_RightOuterJoin o, collector + collector << "RIGHT OUTER JOIN " + collector = visit o.left, collector + collector << SPACE + visit o.right, collector end def visit_Arel_Nodes_InnerJoin o, collector |