app/models/query_builder.rb
# Augments the model class or seed query, by applying all filters.
# This augmented query can be retrieved via the 'query' method.
#
# If any of the filters is invalid (i.e. has no meaning), and therefore would
# lead to no results, the entire query is modified to return no results.
#
# A filter is deemed invalid if the 'apply_filter' method returns false.
Augments the model class or seed query, by applying all filters.
This augmented query can be retrieved via the 'query' method.

If any of the filters is invalid , and therefore would
lead to no results, the entire query is modified to return no results.

A filter is deemed invalid if the 'apply_filter' method returns false.
Augments the model class or seed query by applying all filters . This augmented query can be retrieved via the ' query ' method . If any of the filters is invalid and therefore would lead to no results the entire query is modified to return no results . A filter is deemed invalid if the ' apply_filter ' method returns false .
def apply_filters
    if @filters.present?
      @filters.map {|i| i[1]}.each do |filter|
        unless apply_filter(filter)
          @query = @query.none
          return
        end
      end
    end
  end
def apply_filters if @filters . present? @filters . map { | i | i [ 1 ] } . each do | filter | unless apply_filter ( filter ) @query = @query . none return end end end end
Augments the model class or seed query, by applying all filters.
Augments the model class or seed query by applying all filters .