From 84c2e39e6c6642ceda85c296fed9581f5482dcfe Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 3 Apr 2015 17:06:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=97=BB=E8=AF=84=E8=AE=BA=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E9=94=99=E8=AF=AF=E3=80=82=E8=AF=AF=E5=B0=86safe=5Fat?= =?UTF-8?q?tributes=E6=8D=A2=E4=B8=BA=E7=9B=B4=E6=8E=A5=E5=B1=9E=E6=80=A7c?= =?UTF-8?q?omments?= 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 bb84b1fa4..57ad9d4ce 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -27,7 +27,7 @@ class CommentsController < ApplicationController raise Unauthorized unless @news.commentable? @comment = Comment.new - @comment.comments = params[:comment] + @comment.safe_attributes = params[:comment] @comment.author = User.current if @news.comments << @comment if params[:asset_id]