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

Version Path
weeler-2.0.0 app/controllers/weeler/static_sections_controller.rb
weeler-1.6.0 app/controllers/weeler/static_sections_controller.rb
weeler-1.5.4 app/controllers/weeler/static_sections_controller.rb
weeler-1.5.2 app/controllers/weeler/static_sections_controller.rb
weeler-1.5.1 app/controllers/weeler/static_sections_controller.rb
weeler-1.4.0 app/controllers/weeler/static_sections_controller.rb
weeler-1.2.0 app/controllers/weeler/static_sections_controller.rb
weeler-1.1.0 app/controllers/weeler/static_sections_controller.rb
weeler-1.0.4 app/controllers/weeler/static_sections_controller.rb
weeler-1.0.3 app/controllers/weeler/static_sections_controller.rb
weeler-1.0.2 app/controllers/weeler/static_sections_controller.rb
weeler-1.0.1 app/controllers/weeler/static_sections_controller.rb
weeler-1.0.0 app/controllers/weeler/static_sections_controller.rb