新闻评论出现错误。误将safe_attributes换为直接属性comments
This commit is contained in:
parent
5ee732063d
commit
84c2e39e6c
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue