aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/predications.rb
diff options
context:
space:
mode:
authorSven Fuchs <svenfuchs@artweb-design.de>2010-12-07 10:05:42 +0100
committerSven Fuchs <svenfuchs@artweb-design.de>2010-12-07 10:05:42 +0100
commit1135c2c0884bfddffa39b784d71cd3fb22bd8988 (patch)
tree0b5c71138dcc3c35e20ea4c4babf865a964d54a4 /lib/arel/predications.rb
parent54d62de817f19dfaa206584516ecaedbdbbaea98 (diff)
downloadrails-1135c2c0884bfddffa39b784d71cd3fb22bd8988.tar.gz
rails-1135c2c0884bfddffa39b784d71cd3fb22bd8988.tar.bz2
rails-1135c2c0884bfddffa39b784d71cd3fb22bd8988.zip
implementation for passing a subquery to #in and #not_in
Diffstat (limited to 'lib/arel/predications.rb')
-rw-r--r--lib/arel/predications.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/predications.rb b/lib/arel/predications.rb
index 5a5c3d4495..dec4392f0f 100644
--- a/lib/arel/predications.rb
+++ b/lib/arel/predications.rb
@@ -31,7 +31,7 @@ module Arel
def in other
case other
when Arel::SelectManager
- Nodes::In.new self, other.to_a.map { |x| x.id }
+ Arel::Nodes::In.new(self, other)
when Range
if other.exclude_end?
left = Nodes::GreaterThanOrEqual.new(self, other.begin)
@@ -56,7 +56,7 @@ module Arel
def not_in other
case other
when Arel::SelectManager
- Nodes::NotIn.new self, other.to_a.map { |x| x.id }
+ Arel::Nodes::NotIn.new(self, other)
when Range
if other.exclude_end?
left = Nodes::LessThan.new(self, other.begin)