mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Handle ranges with excluded end.
This commit is contained in:
parent
aa9559c399
commit
233ee77f45
1 changed files with 5 additions and 1 deletions
|
@ -111,7 +111,11 @@ module Arel
|
||||||
end
|
end
|
||||||
|
|
||||||
def in(array)
|
def in(array)
|
||||||
Predicates::In.new(self, array)
|
if array.is_a?(Range) && array.exclude_end?
|
||||||
|
[Predicates::GreaterThanOrEqualTo.new(self, array.begin), Predicates::LessThan.new(self, array.end)]
|
||||||
|
else
|
||||||
|
Predicates::In.new(self, array)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
include Predications
|
include Predications
|
||||||
|
|
Loading…
Reference in a new issue