class Ransack::Search

def initialize(object, params = {}, options = {})

def initialize(object, params = {}, options = {})
  strip_whitespace = options.fetch(:strip_whitespace, Ransack.options[:strip_whitespace])
  params = params.to_unsafe_h if params.respond_to?(:to_unsafe_h)
  if params.is_a? Hash
    params = params.dup
    params = params.transform_values { |v| v.is_a?(String) && strip_whitespace ? v.strip : v }
    params.delete_if { |k, v| [*v].all?{ |i| i.blank? && i != false } }
  else
    params = {}
  end
  @context = options[:context] || Context.for(object, options)
  @context.auth_object = options[:auth_object]
  @base = Nodes::Grouping.new(
    @context, options[:grouping] || Constants::AND
    )
  @scope_args = {}
  @sorts ||= []
  @ignore_unknown_conditions = options[:ignore_unknown_conditions] == false ? false : true
  build(params.with_indifferent_access)
end