Method: Weeler::StaticSectionsController#update
- Defined in:
- app/controllers/weeler/static_sections_controller.rb
#update ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/weeler/static_sections_controller.rb', line 8 def update params[:translations].each do |translation| id, value = translation.first, translation.last translation = I18n::Backend::Weeler::Translation.find(id) translation.value = value translation.save end Setting.i18n_updated_at = Time.current redirect_to({ action: :show, id: params[:id] }, { flash: { success: "Section updated." } }) end |