Class: Spotlight::AppearancesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Spotlight::AppearancesController
- Defined in:
- app/controllers/spotlight/appearances_controller.rb
Overview
Edit and update an exhibit's appearance
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
10 11 12 13 14 |
# File 'app/controllers/spotlight/appearances_controller.rb', line 10 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
16 17 18 19 20 21 22 23 |
# File 'app/controllers/spotlight/appearances_controller.rb', line 16 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: else render 'edit' end end |