method

grouping_queries

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: ActiveRecord::PredicateBuilder
grouping_queries(queries) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/relation/predicate_builder.rb, line 140
      def grouping_queries(queries)
        if queries.one?
          queries.first
        else
          queries.map! { |query| query.reduce(&:and) }
          queries = queries.reduce { |result, query| Arel::Nodes::Or.new(result, query) }
          Arel::Nodes::Grouping.new(queries)
        end
      end
Register or log in to add new notes.