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, "You cannot make changes to settings in demo mode. Sorry about that."
  end
  
  Shoppe::Setting.update_from_hash(params[:settings].permit!)
  redirect_to :settings, :notice => "Settings have been updated successfully."
end