Sha256: 8baa77aa7c481ab054a6e5c3f8ad9338d68d63e19af7a8c9371702deff290205
Contents?: true
Size: 581 Bytes
Versions: 13
Compression:
Stored size: 581 Bytes
Contents
module Weeler class StaticSectionsController < ContentController def show @section = params[:id] @items = Weeler.static_sections[@section.to_sym] end 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 Settings.i18n_updated_at = Time.now redirect_to({action: :show, id: params[:id]}, {flash: {success: "Section updated."}}) end end end
Version data entries
13 entries across 13 versions & 1 rubygems