From 79d1acd0164f6d8958919698d79e1880ea29528c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 24 Dec 2019 17:41:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/comments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index c011d53ec..c5d3082ba 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -52,7 +52,7 @@ class CommentsController < ApplicationController def hidden if current_user.admin_or_business? @discuss = @hack.discusses.where(id: params[:id]).first - @discuss.update_attribute(:hidden, params[:hidden] == "1") + @discuss.update_attribute(:hidden, params[:hidden].to_i == 1) sucess_status else Educoder::TipException(403, "..")