From 30a1c0bafbf876e313a1f759d1e971c14578bdf5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 20 Nov 2019 13:52:00 +0800 Subject: [PATCH] =?UTF-8?q?OJ=E8=AF=84=E8=AE=BA=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/comments_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 99b5a0643..851567c92 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -37,6 +37,12 @@ class CommentsController < ApplicationController @disscusses= paginate disscusses end + # 删除 + def destroy + @hack.discusses.find_by(id: params[:id]).destroy + render_ok + end + private def find_hack