diff options
author | Philip Hallstrom <philip@pjkh.com> | 2008-08-21 16:08:42 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-08-21 16:11:28 +0100 |
commit | 49c0e1e594c95d7e8446ebabecc9147afa62de7d (patch) | |
tree | fc260ee34139101764af8005d4284e3b4b913652 /activerecord/lib | |
parent | a970f916fb1e05376733e2d42d9bcc2b873af355 (diff) | |
download | rails-49c0e1e594c95d7e8446ebabecc9147afa62de7d.tar.gz rails-49c0e1e594c95d7e8446ebabecc9147afa62de7d.tar.bz2 rails-49c0e1e594c95d7e8446ebabecc9147afa62de7d.zip |
Fix generated WHERE IN query for named scopes. [#583 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 5357255bad..15c6bc1b4a 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1750,7 +1750,7 @@ module ActiveRecord #:nodoc: def attribute_condition(argument) case argument when nil then "IS ?" - when Array, ActiveRecord::Associations::AssociationCollection then "IN (?)" + when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::NamedScope::Scope then "IN (?)" when Range then "BETWEEN ? AND ?" else "= ?" end |