Class: Spree::Admin::TaxCategoriesController

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

Instance Method Summary collapse

Methods inherited from ResourceController

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

Instance Method Details

#destroyObject



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

def destroy
  if @object.destroy
    flash[:success] = flash_message_for(@object, :successfully_removed)
    respond_with(@object) do |format|
      format.html { redirect_to collection_url }
      format.js   { render :partial => "spree/admin/shared/destroy" }
    end
  else
    respond_with(@object) do |format|
      format.html { redirect_to collection_url }
    end
  end
end