[refs #616] fixed 500 when failed to create comment
This commit is contained in:
parent
fc672451c6
commit
f4bbeaaa46
|
@ -14,7 +14,8 @@ class Projects::CommentsController < Projects::BaseController
|
|||
redirect_to project_commentable_path(@project, @commentable)
|
||||
else
|
||||
flash[:error] = I18n.t("flash.comment.save_error")
|
||||
render :action => 'new'
|
||||
flash[:warning] = @comment.errors.full_messages.join('. ')
|
||||
redirect_to project_commentable_path(@project, @commentable)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue