Class: Shoppe::SettingsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/shoppe/settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#updateObject


6
7
8
9
10
11
12
13
# File 'app/controllers/shoppe/settings_controller.rb', line 6

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

  Shoppe::Setting.update_from_hash(params[:settings].permit!)
  redirect_to :settings, :notice => t('shoppe.settings.update_notice')
end