Sha256: fd0d2687bbcfb8cc8c035205169967d4d893712d7066081e5f9bb1924756e8c8

Contents?: true

Size: 792 Bytes

Versions: 18

Compression:

Stored size: 792 Bytes

Contents

# frozen_string_literal: true
module Blacklight
  class Configuration::FacetField < Blacklight::Configuration::Field
    extend Deprecation

    def normalize! blacklight_config = nil
      query.stringify_keys! if query

      self.collapse = true if collapse.nil?
      self.show = true if show.nil?
      self.if = show if self.if.nil?
      self.index_range = 'A'..'Z' if index_range == true

      if link_to_search
        Deprecation.warn(Blacklight::Configuration::FacetField, '`link_to_search:` is deprecated, use `link_to_facet:` instead')
        self.link_to_facet = link_to_search if link_to_facet.nil?
      end

      super

      if single && tag.blank? && ex.blank?
        self.tag = "#{key}_single"
        self.ex = "#{key}_single"
      end

      self
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
blacklight-7.9.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.8.1 lib/blacklight/configuration/facet_field.rb
blacklight-7.8.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.7.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.6.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.5.1 lib/blacklight/configuration/facet_field.rb
blacklight-7.5.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.4.2 lib/blacklight/configuration/facet_field.rb
blacklight-7.4.1 lib/blacklight/configuration/facet_field.rb
blacklight-7.4.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.3.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.2.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.1.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.1.0.alpha lib/blacklight/configuration/facet_field.rb
blacklight-7.0.1 lib/blacklight/configuration/facet_field.rb
blacklight-7.0.0 lib/blacklight/configuration/facet_field.rb
blacklight-7.0.0.rc2 lib/blacklight/configuration/facet_field.rb
blacklight-7.0.0.rc1 lib/blacklight/configuration/facet_field.rb