Anemic params method

Wont ever get reused here since there is no update
This commit is contained in:
David Heinemeier Hansson
2025-04-11 18:21:44 +02:00
parent 8d36f13fab
commit aefae634c3
@@ -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