From 049034c34d9b884f27c23cea5204cd5186baf059 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Tue, 25 Jul 2017 19:19:15 +0900 Subject: Remove unused `queries_predicates` Since 213796f, `queries_predicates` is no longer used. --- .../relation/predicate_builder/array_handler.rb | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'activerecord/lib/active_record') 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 ad617365fc..2fd75c8958 100644 --- a/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb +++ b/activerecord/lib/active_record/relation/predicate_builder/array_handler.rb @@ -9,7 +9,6 @@ module ActiveRecord def call(attribute, value) return attribute.in([]) if value.empty? - return queries_predicates(value) if value.all? { |v| v.is_a?(Hash) } values = value.map { |x| x.is_a?(Base) ? x.id : x } nils, values = values.partition(&:nil?) @@ -44,17 +43,6 @@ module ActiveRecord other end end - - private - def queries_predicates(queries) - if queries.size > 1 - queries.map do |query| - Arel::Nodes::And.new(predicate_builder.build_from_hash(query)) - end.inject(&:or) - else - predicate_builder.build_from_hash(queries.first) - end - end end end end -- cgit v1.2.3