diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 7058ced2c..2bec3eb9f 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -2,10 +2,8 @@ class CommentsController < ApplicationController before_action :set_bubble def create - @comment = @bubble.comments.create(comment_params) - @comment.save - - redirect_to bubble_path(@bubble, anchor: "comment_#{@comment.id}") + @bubble.comments.create!(comment_params) + redirect_to @bubble end private diff --git a/app/views/comments/_new.html.erb b/app/views/comments/_new.html.erb index 0a4a1b955..24e59dfc9 100644 --- a/app/views/comments/_new.html.erb +++ b/app/views/comments/_new.html.erb @@ -5,8 +5,9 @@ <%= Current.user.name %>