项目新闻 评论内容获取不正确

This commit is contained in:
sw 2015-04-08 18:15:58 +08:00
parent d08329631a
commit c399ab2e4f
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class CommentsController < ApplicationController
raise Unauthorized unless @news.commentable?
@comment = Comment.new
@comment.comments = params[:comment]
@project ? @comment.comments = params[:comment][:comments] : @comment.comments = params[:comment]
@comment.author = User.current
if @news.comments << @comment
if params[:asset_id]