Skip to content

Commit

Permalink
Fix small bug where ActiveRecord::PredicateBuilder#build_from_hash di…
Browse files Browse the repository at this point in the history
…dn't test for Arel::Relation as right hand value. [#4917 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
jimsynz authored and josevalim committed Jun 22, 2010
1 parent 7033be5 commit d0df7f1
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -28,7 +28,7 @@ def build_from_hash(attributes, default_table)
when Array, ActiveRecord::Associations::AssociationCollection, ActiveRecord::Relation
values = value.to_a
attribute.in(values)
when Range
when Range, Arel::Relation
attribute.in(value)
else
attribute.eq(value)
Expand Down

1 comment on commit d0df7f1

@jimsynz
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w00t!

Please sign in to comment.