diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-24 18:13:01 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-24 18:13:01 -0700 |
commit | 9c4670c6505d462c27a58a84e6b0746e20b98e7f (patch) | |
tree | e06e8a15942046628e34d24d3d39e9c909875c59 /lib/arel/visitors | |
parent | 55d1f9fd127397b7a4c85121a8ef02451257f756 (diff) | |
download | rails-9c4670c6505d462c27a58a84e6b0746e20b98e7f.tar.gz rails-9c4670c6505d462c27a58a84e6b0746e20b98e7f.tar.bz2 rails-9c4670c6505d462c27a58a84e6b0746e20b98e7f.zip |
moving visitor logic to the visitor
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/join_sql.rb | 4 |
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 |