Class: Spotlight::TranslationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Spotlight::TranslationsController
- Defined in:
- app/controllers/spotlight/translations_controller.rb
Overview
Base CRUD controller for translations
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
16 17 18 |
# File 'app/controllers/spotlight/translations_controller.rb', line 16 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: else render 'edit' end end |
#show ⇒ Object
10 11 12 13 14 |
# File 'app/controllers/spotlight/translations_controller.rb', line 10 def show respond_to do |format| format.yaml end end |
#update ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/spotlight/translations_controller.rb', line 20 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: else render 'edit' end end |