Sha256: b013c0c07ae40eb877c926e517ff42014690951cb65a848aa5547e4c64171c4c

Contents?: true

Size: 554 Bytes

Versions: 5

Compression:

Stored size: 554 Bytes

Contents

module Spotlight
  module Config
    extend ActiveSupport::Concern

    def exhibit_specific_blacklight_config
      @exhibit_specific_blacklight_config ||=
        if current_exhibit
          current_exhibit.blacklight_config
        elsif params[:exhibit_id]
          raise "Exhibit id exists (#{params[:exhibit_id]}), but @exhibit hasn't been loaded yet"
        else
          # Not in an exhibit context. (So why are we calling a method called exhibit_specific_blacklight_config?)
          raise "Exhibit not found"
        end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-spotlight-0.4.1 lib/spotlight/config.rb
blacklight-spotlight-0.3.1 lib/spotlight/config.rb
blacklight-spotlight-0.3.0 lib/spotlight/config.rb
blacklight-spotlight-0.2.0 lib/spotlight/config.rb
blacklight-spotlight-0.1.0 lib/spotlight/config.rb