Method: CategoriesController#destroy

Defined in:
app/controllers/categories_controller.rb

#destroyObject

DELETE /categories/1 DELETE /categories/1.json



68
69
70
71
72
73
74
75
76
# File 'app/controllers/categories_controller.rb', line 68

def destroy
  @category = Category.find(params[:id])
  @category.destroy

  respond_to do |format|
    format.html { redirect_to categories_url }
    format.json { head :ok }
  end
end