aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/attributes/attribute.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-20 13:29:12 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-20 13:29:12 -0700
commitd8de55cee197d887b478b134ec692776613bf998 (patch)
treed8f094320dac00f89d44a1db01aa19cc24d8138c /lib/arel/attributes/attribute.rb
parent6f9f83e474505d7e1c253fd8f120a06e2dcd61cd (diff)
downloadrails-d8de55cee197d887b478b134ec692776613bf998.tar.gz
rails-d8de55cee197d887b478b134ec692776613bf998.tar.bz2
rails-d8de55cee197d887b478b134ec692776613bf998.zip
adding crazy code to fix the last two AR tests
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