aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorMelanie Gilman <melanie@thoughtbot.com>2014-12-04 14:51:41 -0500
committerMelanie Gilman <melanie@thoughtbot.com>2014-12-04 16:13:00 -0500
commitbe6897e34d8a53d07eb62637ef3d0a1be660d432 (patch)
treeb04b8289aefd566318d3414a4e6e95d5d5093a5c /activerecord/lib
parent6c9ed6dbc62450cdb87559afd15798305e069146 (diff)
downloadrails-be6897e34d8a53d07eb62637ef3d0a1be660d432.tar.gz
rails-be6897e34d8a53d07eb62637ef3d0a1be660d432.tar.bz2
rails-be6897e34d8a53d07eb62637ef3d0a1be660d432.zip
Remove deprecated behavior allowing nested arrays as query values
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/relation/predicate_builder/array_handler.rb10
1 files changed, 0 insertions, 10 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 b8f3285c3e..4cba297be5 100644
--- a/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb
+++ b/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb
@@ -7,16 +7,6 @@ module ActiveRecord
values = value.map { |x| x.is_a?(Base) ? x.id : x }
nils, values = values.partition(&:nil?)
- if values.any? { |val| val.is_a?(Array) }
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- Passing a nested array to Active Record finder methods is
- deprecated and will be removed. Flatten your array before using
- it for 'IN' conditions.
- MSG
-
- values = values.flatten
- end
-
return attribute.in([]) if values.empty? && nils.empty?
ranges, values = values.partition { |v| v.is_a?(Range) }