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
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
DELETE /articles/1
 DELETE /articles/1.json