Allow flexibility of "or" grouping on base search

This commit is contained in:
Mark Edmondson 2014-08-01 16:31:59 -07:00
parent 3910773af4
commit 83ac5c9355
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module Ransack
.delete_if { |k, v| [*v].all? { |i| i.blank? && i != false } }
@context = Context.for(object, options)
@context.auth_object = options[:auth_object]
@base = Nodes::Grouping.new(@context, 'and')
@base = Nodes::Grouping.new(@context, options[:grouping] || 'and')
@scope_args = {}
build(params.with_indifferent_access)
end