app/controllers/weeler/seo_items_controller.rb in weeler-1.0.0 vs app/controllers/weeler/seo_items_controller.rb in weeler-1.0.1

- old
+ new

@@ -1,15 +1,15 @@ 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...-1].join('_') }.uniq{ |t| t} + @groups = @translations_in_seo.map{ |t| t.key.split(".")[1] }.uniq{ |t| t} end def edit - @section = params[:id].gsub('_', '.') + @section = params[:id] end def update params[:translations].each do |translation| id, value = translation.first, translation.last @@ -19,6 +19,6 @@ end Settings.i18n_updated_at = Time.now redirect_to({action: :edit, id: params[:id]}, {flash: {success: "Section updated."}}) end end -end +end \ No newline at end of file