diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-23 14:44:10 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-08-23 14:44:10 -0700 |
commit | c151df07acc06b06179c2dc6205db029ff9ce001 (patch) | |
tree | 24717fd5502ac9fa2634df8694e04aa800d3e287 /lib/arel/nodes | |
parent | 3bc3b145aedea216eb84e213bac1017c6090d42b (diff) | |
download | rails-c151df07acc06b06179c2dc6205db029ff9ce001.tar.gz rails-c151df07acc06b06179c2dc6205db029ff9ce001.tar.bz2 rails-c151df07acc06b06179c2dc6205db029ff9ce001.zip |
AND nodes are supported
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r-- | lib/arel/nodes/and.rb | 6 | ||||
-rw-r--r-- | lib/arel/nodes/binary.rb | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/arel/nodes/and.rb b/lib/arel/nodes/and.rb new file mode 100644 index 0000000000..80f420b4f1 --- /dev/null +++ b/lib/arel/nodes/and.rb @@ -0,0 +1,6 @@ +module Arel + module Nodes + class And < Arel::Nodes::Binary + end + end +end diff --git a/lib/arel/nodes/binary.rb b/lib/arel/nodes/binary.rb index fdfcab2d3f..3cd9583e79 100644 --- a/lib/arel/nodes/binary.rb +++ b/lib/arel/nodes/binary.rb @@ -12,6 +12,10 @@ module Arel Nodes::Or.new self, right end + def and right + Nodes::And.new self, right + end + # FIXME: this method should go away. I don't like people calling # to_sql on non-head nodes. This forces us to walk the AST until we # can find a node that has a "relation" member. |