Class: Spotlight::MetadataConfigurationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Spotlight::MetadataConfigurationsController
- Defined in:
- app/controllers/spotlight/metadata_configurations_controller.rb
Overview
CRUD actions for Blacklight metadata fields (e.g. index/show fields for various view types)
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
20 21 22 23 24 |
# File 'app/controllers/spotlight/metadata_configurations_controller.rb', line 20 def edit (t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit) (t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit)) (t(:'spotlight.configuration.sidebar.metadata'), (@exhibit)) end |
#show ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/controllers/spotlight/metadata_configurations_controller.rb', line 12 def show respond_to do |format| format.json do render json: @blacklight_configuration.blacklight_config.index_fields.as_json end end end |
#update ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'app/controllers/spotlight/metadata_configurations_controller.rb', line 26 def update if @blacklight_configuration.update(exhibit_params) flash[:notice] = t(:'helpers.submit.blacklight_configuration.updated', model: @blacklight_configuration.class.model_name.human.downcase) redirect_to (@exhibit) else render action: 'edit' end end |