diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-16 17:26:12 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-16 17:26:12 -0700 |
commit | ae547dc139179720a814ae21f43f3e0aaad97c5c (patch) | |
tree | 8e3b12ee400c200067676511f976e36486f74fba /lib/arel/visitors | |
parent | 66243e491d06edf0bff21000adad2837e67c21e2 (diff) | |
download | rails-ae547dc139179720a814ae21f43f3e0aaad97c5c.tar.gz rails-ae547dc139179720a814ae21f43f3e0aaad97c5c.tar.bz2 rails-ae547dc139179720a814ae21f43f3e0aaad97c5c.zip |
OR nodes are somewhat working
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index b0fed4936b..9dc7696ad8 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -60,6 +60,10 @@ module Arel "#{visit o.left} IN (#{o.right.map { |x| quote visit x }.join ', '})" end + def visit_Arel_Nodes_Or o + "#{visit o.left} OR #{visit o.right}" + end + def visit_Arel_Nodes_Equality o "#{visit o.left} = #{quote visit o.right}" end |