Sha256: 2621a61f5ca3a0cb906315d9e6898fcdedfff1f8d07018ba602c7dea7a0e11b1
Contents?: true
Size: 750 Bytes
Versions: 12
Compression:
Stored size: 750 Bytes
Contents
module Weeler class SeoItemsController < ConfigurationController def index @translations_in_seo = I18n::Backend::Weeler::Translation.select("key").where("key LIKE ?", "seo.%").order("key") @groups = @translations_in_seo.map{ |t| t.key.split(".")[1] }.uniq{ |t| t} end def edit @section = params[:id] 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: :edit, id: params[:id]}, {flash: {success: "Section updated."}}) end end end
Version data entries
12 entries across 12 versions & 1 rubygems