Class: Spotlight::TranslationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Spotlight::TranslationsController
- Defined in:
- app/controllers/spotlight/translations_controller.rb
Overview
Base CRUD controller for translations
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
10 |
# File 'app/controllers/spotlight/translations_controller.rb', line 10 def edit; end |
#update ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/spotlight/translations_controller.rb', line 12 def update if current_exhibit.update(exhibit_params) I18n.reload! # reload since we're memoizing notice = t(:'helpers.submit.spotlight_default.updated', model: current_exhibit.class.model_name.human.downcase) redirect_to edit_exhibit_translations_path(current_exhibit, language: @language, tab: @tab), notice: notice else render 'edit' end end |