Sha256: 66a77271be71176f158af0eb71121e08646701985f7217380eccefb944137e37

Contents?: true

Size: 368 Bytes

Versions: 31

Compression:

Stored size: 368 Bytes

Contents

# frozen_string_literal: true
module Blacklight
  module Parameters
    ##
    # Sanitize the search parameters by removing unnecessary parameters
    # from the provided parameters.
    # @param [Hash] params parameters
    def self.sanitize params
      params.reject { |k,v| v.nil? }
            .except(:action, :controller, :id, :commit, :utf8)
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
blacklight-6.10.1 lib/blacklight/parameters.rb
blacklight-6.10.0 lib/blacklight/parameters.rb
blacklight-6.9.0 lib/blacklight/parameters.rb
blacklight-6.8.0 lib/blacklight/parameters.rb
blacklight-6.7.3 lib/blacklight/parameters.rb
blacklight-6.7.2 lib/blacklight/parameters.rb
blacklight-6.7.1 lib/blacklight/parameters.rb
blacklight-6.7.0 lib/blacklight/parameters.rb
blacklight-6.6.2 lib/blacklight/parameters.rb
blacklight-6.6.1 lib/blacklight/parameters.rb
blacklight-6.6.0 lib/blacklight/parameters.rb