diff --git a/app/controllers/cards/comments/reactions_controller.rb b/app/controllers/cards/comments/reactions_controller.rb index 04f3cb407..0a728fbb2 100644 --- a/app/controllers/cards/comments/reactions_controller.rb +++ b/app/controllers/cards/comments/reactions_controller.rb @@ -10,7 +10,7 @@ class Cards::Comments::ReactionsController < ApplicationController end def create - reaction = @comment.reactions.create!(reaction_params) + reaction = @comment.reactions.create!(params.expect(reaction: :content)) broadcast_create(reaction) redirect_to card_comment_reactions_path(@card, @comment) @@ -28,10 +28,6 @@ class Cards::Comments::ReactionsController < ApplicationController @comment = @card.comments.find(params[:comment_id]) end - def reaction_params - params.expect(reaction: :content) - end - def broadcast_create(reaction) reaction.broadcast_append_to @card, target: [ @comment, :reactions ], partial: "cards/comments/reactions/reaction" end