Method: Ems::ArticlesController#destroy

Defined in:
app/controllers/ems/articles_controller.rb

#destroyObject

DELETE /articles/1 DELETE /articles/1.json



80
81
82
83
84
85
86
87
88
89
# File 'app/controllers/ems/articles_controller.rb', line 80

def destroy
  @article = Article.find(params[:id])
  category = @article.category
  @article.destroy
  
  respond_to do |format|
    format.html { redirect_to category_articles_path(category), notice: 'Article was successfully deleted.' }
    format.json { head :no_content }
  end
end