Permalink
Browse files

Arel now handles ranges with excluded end.

  • Loading branch information...
1 parent 53ddbfc commit 7006aa1a853e90f5883b3dc5913b4e310789bc6f @miloops miloops committed Mar 29, 2010
Showing with 1 addition and 6 deletions.
  1. +1 −6 activerecord/lib/active_record/relation/predicate_builder.rb
@@ -27,12 +27,7 @@ def build_from_hash(attributes, default_table)
values = value.to_a
attribute.in(values)
when Range
- # TODO : Arel should handle ranges with excluded end.
- if value.exclude_end?
- [attribute.gteq(value.begin), attribute.lt(value.end)]
- else
- attribute.in(value)
- end
+ attribute.in(value)
else
attribute.eq(value)
end

0 comments on commit 7006aa1

Please sign in to comment.