From aefae634c3ae896bdc6da2354161b0205fc0b338 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 11 Apr 2025 18:21:44 +0200 Subject: [PATCH] Anemic params method Wont ever get reused here since there is no update --- app/controllers/cards/comments/reactions_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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