Class: Spree::Admin::BoltsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/admin/bolts_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



10
# File 'app/controllers/spree/admin/bolts_controller.rb', line 10

def edit; end

#showObject



8
# File 'app/controllers/spree/admin/bolts_controller.rb', line 8

def show; end

#updateObject



12
13
14
15
16
17
18
19
20
# File 'app/controllers/spree/admin/bolts_controller.rb', line 12

def update
  if @bolt_configuration.update(bolt_configuration_params)
    flash[:success] = t('spree.admin.bolt.updated_successfully')
    redirect_to admin_bolt_path
  else
    flash[:error] = @bolt_configuration.errors.full_messages.to_sentence
    render :edit
  end
end