Class: Spree::Admin::ShippingMethodsController

Inherits:
ResourceController show all
Defined in:
app/controllers/spree/admin/shipping_methods_controller.rb

Instance Method Summary collapse

Methods inherited from ResourceController

belongs_to, create, #create, destroy, #edit, #new, new_action, #update, update, #update_positions

Methods included from Core::ControllerHelpers::Common

included

Methods included from Core::ControllerHelpers::Auth

#current_ability, included, #redirect_back_or_default, #store_location, #try_spree_current_user, #unauthorized

Instance Method Details

#destroyObject



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/spree/admin/shipping_methods_controller.rb', line 7

def destroy
  @object.touch :deleted_at

  flash[:success] = flash_message_for(@object, :successfully_removed)

  respond_with(@object) do |format|
    format.html { redirect_to collection_url }
    format.js  { render_js_for_destroy }
  end
end