Skip to content
Browse files

User id instead of quoted_id to prevent double quoting. Fixes failing…

… test for bug #6036.
  • Loading branch information...
1 parent febdf5a commit b9ce3419e5a9bdc4ade20f21a6c93e76a3b69caf Robert Pankowecki (Gavdi) committed with tenderlove Dec 31, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation/predicate_builder.rb
View
2 activerecord/lib/active_record/relation/predicate_builder.rb
@@ -20,7 +20,7 @@ def self.build_from_hash(engine, attributes, default_table)
case value
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Relation
values = value.to_a.map { |x|
- x.respond_to?(:quoted_id) ? x.quoted_id : x
+ x.is_a?(ActiveRecord::Base) ? x.id : x
}
attribute.in(values)
when Range, Arel::Relation

0 comments on commit b9ce341

Please sign in to comment.
Something went wrong with that request. Please try again.