Skip to content
This repository
Browse code

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

… test for bug #6036.
  • Loading branch information...
commit b9ce3419e5a9bdc4ade20f21a6c93e76a3b69caf 1 parent febdf5a
Robert Pankowecki (Gavdi) authored tenderlove committed
2  activerecord/lib/active_record/relation/predicate_builder.rb
@@ -20,7 +20,7 @@ def self.build_from_hash(engine, attributes, default_table)
20 20 case value
21 21 when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Relation
22 22 values = value.to_a.map { |x|
23   - x.respond_to?(:quoted_id) ? x.quoted_id : x
  23 + x.is_a?(ActiveRecord::Base) ? x.id : x
24 24 }
25 25 attribute.in(values)
26 26 when Range, Arel::Relation

0 comments on commit b9ce341

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