aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-07-25 19:19:15 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-07-25 19:19:15 +0900
commit049034c34d9b884f27c23cea5204cd5186baf059 (patch)
tree3cd56b2f918b0d95aff4adbaa9524581027d5ef0 /activerecord
parent1d3b6d23109157b794baca09a9d1167fa40a58fe (diff)
downloadrails-049034c34d9b884f27c23cea5204cd5186baf059.tar.gz
rails-049034c34d9b884f27c23cea5204cd5186baf059.tar.bz2
rails-049034c34d9b884f27c23cea5204cd5186baf059.zip
Remove unused `queries_predicates`
Since 213796f, `queries_predicates` is no longer used.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation/predicate_builder/array_handler.rb12
1 files changed, 0 insertions, 12 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 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