Class: Spree::Admin::MarketplaceSettingsController
- Inherits:
-
BaseController
- Object
- BaseController
- Spree::Admin::MarketplaceSettingsController
- Defined in:
- app/controllers/spree/admin/marketplace_settings_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
3 4 5 |
# File 'app/controllers/spree/admin/marketplace_settings_controller.rb', line 3 def edit @config = Spree::MarketplaceConfiguration.new end |
#update ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/spree/admin/marketplace_settings_controller.rb', line 7 def update config = Spree::MarketplaceConfiguration.new params.each do |name, value| next unless config.has_preference? name config[name] = value end flash[:success] = Spree.t('admin.marketplace_settings.update.success') redirect_to spree.edit_admin_marketplace_settings_path end |