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.25.0 lib/blacklight/parameters.rb
blacklight-6.24.0 lib/blacklight/parameters.rb
blacklight-6.23.0 lib/blacklight/parameters.rb
blacklight-6.22.0 lib/blacklight/parameters.rb
blacklight-6.21.0 lib/blacklight/parameters.rb
blacklight-6.20.0 lib/blacklight/parameters.rb
blacklight-6.19.2 lib/blacklight/parameters.rb
blacklight-6.19.1 lib/blacklight/parameters.rb
blacklight-6.19.0 lib/blacklight/parameters.rb
blacklight-6.18.0 lib/blacklight/parameters.rb
blacklight-6.17.0 lib/blacklight/parameters.rb
blacklight-6.16.0 lib/blacklight/parameters.rb
blacklight-6.15.0 lib/blacklight/parameters.rb
blacklight-6.14.1 lib/blacklight/parameters.rb
blacklight-6.14.0 lib/blacklight/parameters.rb
blacklight-6.13.0 lib/blacklight/parameters.rb
blacklight-6.12.0 lib/blacklight/parameters.rb
blacklight-6.11.2 lib/blacklight/parameters.rb
blacklight-6.11.1 lib/blacklight/parameters.rb
blacklight-6.11.0 lib/blacklight/parameters.rb