Permalink
Browse files

Fix small bug where ActiveRecord::PredicateBuilder#build_from_hash di…

…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...
1 parent 7033be5 commit d0df7f1196ee633a0cea7b5b8cf8b65a8269df19 @jamesotron jamesotron committed with josevalim Jun 21, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation/predicate_builder.rb
@@ -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)

1 comment on commit d0df7f1

@jamesotron
Contributor

w00t!

Please sign in to comment.