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