aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-27 02:56:11 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-27 02:56:11 +0000
commit02311a5db1800a4654f80ec71e8b7d32b444ff27 (patch)
tree15d81c033d1f947139ec2cb41af0f22d532f5dc5 /activerecord/lib
parent08d23d5375fef67cb3203dfb5e92f41ae87195ee (diff)
downloadrails-02311a5db1800a4654f80ec71e8b7d32b444ff27.tar.gz
rails-02311a5db1800a4654f80ec71e8b7d32b444ff27.tar.bz2
rails-02311a5db1800a4654f80ec71e8b7d32b444ff27.zip
Array attribute conditions work with proxied association collections. Closes #8318.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7133 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index 9d2e186672..77b22aad6a 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -1287,7 +1287,7 @@ module ActiveRecord #:nodoc:
def attribute_condition(argument)
case argument
when nil then "IS ?"
- when Array then "IN (?)"
+ when Array, ActiveRecord::Associations::AssociationCollection then "IN (?)"
when Range then "BETWEEN ? AND ?"
else "= ?"
end