diff --git a/app/controllers/cards/comments_controller.rb b/app/controllers/cards/comments_controller.rb index d437c53fa..b7c6c867a 100644 --- a/app/controllers/cards/comments_controller.rb +++ b/app/controllers/cards/comments_controller.rb @@ -5,7 +5,7 @@ class Cards::CommentsController < ApplicationController before_action :ensure_creatorship, only: %i[ edit update destroy ] def create - @card.comments.create!(comment_params) + @comment = @card.comments.create!(comment_params) end def show @@ -20,7 +20,6 @@ class Cards::CommentsController < ApplicationController def destroy @comment.destroy - redirect_to @card end private diff --git a/app/views/cards/comments/_new.html.erb b/app/views/cards/comments/_new.html.erb index 8fda060d2..5d80fed78 100644 --- a/app/views/cards/comments/_new.html.erb +++ b/app/views/cards/comments/_new.html.erb @@ -1,4 +1,4 @@ -