Module: Spotlight::Config

Extended by:
ActiveSupport::Concern
Included in:
Base, Controller
Defined in:
lib/spotlight/config.rb

Instance Method Summary collapse

Instance Method Details

#exhibit_specific_blacklight_configObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/spotlight/config.rb', line 5

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