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_path, #resource_masthead?, #search_action_url, #search_facet_path, #set_exhibit_locale_scope, #set_locale
Methods included from Config
#exhibit_specific_blacklight_config
Instance Method Details
#edit ⇒ Object
10 11 12 |
# File 'app/controllers/spotlight/translations_controller.rb', line 10 def edit end |
#import ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'app/controllers/spotlight/translations_controller.rb', line 30 def import if current_exhibit.update(import_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), notice: notice else render 'edit' end end |
#show ⇒ Object
24 25 26 27 28 |
# File 'app/controllers/spotlight/translations_controller.rb', line 24 def show respond_to do |format| format.yaml end end |
#update ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/spotlight/translations_controller.rb', line 14 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 |