app/models/spotlight/blacklight_configuration.rb in blacklight-spotlight-2.13.0 vs app/models/spotlight/blacklight_configuration.rb in blacklight-spotlight-3.0.0.alpha.1

- old
+ new

@@ -1,8 +1,8 @@ # frozen_string_literal: true -require 'blacklight/utils' +require 'blacklight/open_struct_with_hash_access' module Spotlight ## # Exhibit-specific blacklight configuration model # rubocop:disable Metrics/ClassLength @@ -68,12 +68,14 @@ # @param [String] view the configuration may be different depending on the index view selected # rubocop:disable Metrics/MethodLength, Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/AbcSize def blacklight_config @blacklight_config ||= begin # Create a new config based on the defaults - config = default_blacklight_config.inheritable_copy + config = default_blacklight_config.inheritable_copy(self.class) + config.current_exhibit = exhibit + config.show.merge! show unless show.blank? config.index.merge! index unless index.blank? config.index.thumbnail_field ||= Spotlight::Engine.config.thumbnail_field @@ -289,10 +291,10 @@ def add_exhibit_tags_fields(config) # rubocop:disable Style/GuardClause unless config.show_fields.include? :exhibit_tags config.add_show_field :exhibit_tags, field: config.document_model.solr_field_for_tagger(exhibit), - link_to_search: true, + link_to_facet: true, separator_options: { words_connector: nil, two_words_connector: nil, last_word_connector: nil } end unless config.facet_fields.include? :exhibit_tags config.add_facet_field :exhibit_tags, field: config.document_model.solr_field_for_tagger(exhibit), limit: true