[refs #616] fixed 500 when failed to create comment

This commit is contained in:
Alexander Machehin 2012-09-24 21:45:15 +06:00
parent fc672451c6
commit f4bbeaaa46
1 changed files with 2 additions and 1 deletions

View File

@ -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