aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/attributes/attribute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/attributes/attribute.rb')
-rw-r--r--lib/arel/attributes/attribute.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/arel/attributes/attribute.rb b/lib/arel/attributes/attribute.rb
index 28493d5cba..6bb880d211 100644
--- a/lib/arel/attributes/attribute.rb
+++ b/lib/arel/attributes/attribute.rb
@@ -12,6 +12,9 @@ module Arel
end
def in other
+ if Arel::SelectManager === other
+ other = other.to_a.map { |x| x.id }
+ end
Nodes::In.new self, other
end