Class: Spotlight::AppearancesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::AppearancesController
- Defined in:
- app/controllers/spotlight/appearances_controller.rb
Overview
Edit and update an exhibit’s appearance
Instance Method Summary collapse
Methods included from Concerns::ApplicationController
#enabled_in_spotlight_view_type_configuration?, #field_enabled?
Methods included from Controller
#blacklight_config, #current_exhibit, #current_masthead, #current_masthead=, #current_site, #default_url_options, #exhibit_masthead?, #exhibit_search_action_url, #exhibit_search_facet_url, #resource_masthead?, #search_action_url, #search_facet_url, #set_exhibit_locale_scope, #set_locale
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#edit ⇒ Object
17 18 19 20 21 |
# File 'app/controllers/spotlight/appearances_controller.rb', line 17 def edit t(:'spotlight.exhibits.breadcrumb', title: @exhibit.title), @exhibit t(:'spotlight.configuration.sidebar.header'), exhibit_dashboard_path(@exhibit) t(:'spotlight.configuration.sidebar.appearance'), edit_exhibit_appearance_path(@exhibit) end |
#update ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/controllers/spotlight/appearances_controller.rb', line 8 def update if @exhibit.update(exhibit_params) notice = t(:'helpers.submit.spotlight_default.updated', model: @exhibit.class.model_name.human.downcase) redirect_to edit_exhibit_appearance_path(@exhibit), notice: notice else render 'edit' end end |