Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

passing the quoted id to arel if the object has a quoted id

  • Loading branch information...
commit 3479c1ea6279fd4197670d2b8d2c83f19f41b412 1 parent 89cc742
Aaron Patterson tenderlove authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 activerecord/lib/active_record/relation/predicate_builder.rb
4 activerecord/lib/active_record/relation/predicate_builder.rb
View
@@ -24,7 +24,9 @@ def build_from_hash(attributes, default_table)
case value
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Relation
- values = value.to_a
+ values = value.to_a.map { |x|
+ x.respond_to?(:quoted_id) ? x.quoted_id : x
+ }
attribute.in(values)
when Range, Arel::Relation
attribute.in(value)
Please sign in to comment.
Something went wrong with that request. Please try again.