diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-10-30 09:45:29 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-10-30 09:47:15 -0600 |
commit | b6a025551910621ef8e86aba88a09161ed0a6fd3 (patch) | |
tree | 4001c36e10990da88eaa2809fa0c9679cca11535 /activerecord/lib/active_record/relation/predicate_builder/array_handler.rb | |
parent | 7cf4d5465deb48f448000e9b484a150261e1054f (diff) | |
download | rails-b6a025551910621ef8e86aba88a09161ed0a6fd3.tar.gz rails-b6a025551910621ef8e86aba88a09161ed0a6fd3.tar.bz2 rails-b6a025551910621ef8e86aba88a09161ed0a6fd3.zip |
Use `#between`, rather than `#in` for passing Ranges to Arel
Passing ranges to `#in` has been deprecated in Arel.
Diffstat (limited to 'activerecord/lib/active_record/relation/predicate_builder/array_handler.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/predicate_builder/array_handler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb b/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb index b6a9b4f63a..b8f3285c3e 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb @@ -32,7 +32,7 @@ module ActiveRecord values_predicate = values_predicate.or(attribute.eq(nil)) end - array_predicates = ranges.map { |range| attribute.in(range) } + array_predicates = ranges.map { |range| attribute.between(range) } array_predicates.unshift(values_predicate) array_predicates.inject { |composite, predicate| composite.or(predicate) } end |