diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-14 10:18:12 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-07-14 10:18:12 -0700 |
commit | 76694a9b9994428838a81746a37e26f698aa4c67 (patch) | |
tree | ae111290de7c80721da508d668d534551e10cec2 /lib/arel | |
parent | ce1a5a73996c23fe13836eab7fa9c7e803155161 (diff) | |
parent | 956b40e93492b147e239d25b502148c9070ffa9d (diff) | |
download | rails-76694a9b9994428838a81746a37e26f698aa4c67.tar.gz rails-76694a9b9994428838a81746a37e26f698aa4c67.tar.bz2 rails-76694a9b9994428838a81746a37e26f698aa4c67.zip |
Merge pull request #361 from evgenim/master
Fix visit_Arel_Nodes_FullOuterJoin/RightOuterJoin
Diffstat (limited to 'lib/arel')
-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 |