Sha256: fcd94d9b0647dbc137144bda7e9956d4d4904030c8aecf31be247203a385cc81

Contents?: true

Size: 460 Bytes

Versions: 8

Compression:

Stored size: 460 Bytes

Contents

module Shoppe
  class SettingsController < ApplicationController
    
    before_filter { @active_nav = :settings }
    
    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
    
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shoppe-1.0.2 app/controllers/shoppe/settings_controller.rb
shoppe-1.0.1 app/controllers/shoppe/settings_controller.rb
shoppe-1.0.0 app/controllers/shoppe/settings_controller.rb
shoppe-0.0.21 app/controllers/shoppe/settings_controller.rb
shoppe-0.0.20 app/controllers/shoppe/settings_controller.rb
shoppe-0.0.19 app/controllers/shoppe/settings_controller.rb
shoppe-0.0.18 app/controllers/shoppe/settings_controller.rb
shoppe-0.0.17 app/controllers/shoppe/settings_controller.rb