diff options
Diffstat (limited to 'app/controllers/comments_controller.rb')
| -rw-r--r-- | app/controllers/comments_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index b1e2b7fe..4848c972 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -7,8 +7,9 @@ class CommentsController < ApplicationController def create creation = Creation.find(params[:creation_id]) - comment = Comment.build_from(creation, current_user, params[:comment][:body]) + comment = Comment.build_from(creation, current_user.id, params[:comment][:body]) if comment.save + flash[:notice] = "Your comment was added!" redirect_to creation_path(creation) else flash[:error] = "Ooops... we couldn't save your comment at this time." |
