Sha256: f4296b69e78216730619adb418c15745fe8070f176280305e3849cbb41c99e33

Contents?: true

Size: 398 Bytes

Versions: 10

Compression:

Stored size: 398 Bytes

Contents

module Tienda
  class SettingsController < ApplicationController

    before_filter { @active_nav = :settings }

    def update
      if Tienda.settings.demo_mode?
        raise Tienda::Error, t('tienda.settings.demo_mode_error')
      end

      Tienda::Setting.update_from_hash(params[:settings].permit!)
      redirect_to :settings, notice: t('tienda.settings.update_notice')
    end

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tienda-2.1.3 app/controllers/tienda/settings_controller.rb
tienda-2.1.2 app/controllers/tienda/settings_controller.rb
tienda-2.1.1 app/controllers/tienda/settings_controller.rb
tienda-2.1.0 app/controllers/tienda/settings_controller.rb
tienda-2.0.2 app/controllers/tienda/settings_controller.rb
tienda-2.0.1 app/controllers/tienda/settings_controller.rb
tienda-1.1.2 app/controllers/tienda/settings_controller.rb
tienda-1.1.1 app/controllers/tienda/settings_controller.rb
tienda-1.1.0 app/controllers/tienda/settings_controller.rb
tienda-1.0.0 app/controllers/tienda/settings_controller.rb