diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-03-29 12:30:13 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-03-29 12:30:13 -0300 |
commit | 7006aa1a853e90f5883b3dc5913b4e310789bc6f (patch) | |
tree | 2f384e4ce84aae66e74178742e5a034814664181 | |
parent | 53ddbfc460f5a54d5b81e7bfbc1c5828f90488c1 (diff) | |
download | rails-7006aa1a853e90f5883b3dc5913b4e310789bc6f.tar.gz rails-7006aa1a853e90f5883b3dc5913b4e310789bc6f.tar.bz2 rails-7006aa1a853e90f5883b3dc5913b4e310789bc6f.zip |
Arel now handles ranges with excluded end.
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder.rb b/activerecord/lib/active_record/relation/predicate_builder.rb index 7e83eccbb5..711df16bf1 100644 --- a/activerecord/lib/active_record/relation/predicate_builder.rb +++ b/activerecord/lib/active_record/relation/predicate_builder.rb @@ -27,12 +27,7 @@ module ActiveRecord 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 |