From 8ddfcef25966aacf47a93c1dc346589b5dc170fb Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 5 Nov 2023 11:45:51 +0100 Subject: [PATCH] Fix rubocop nits --- app/controllers/reactions_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/reactions_controller.rb b/app/controllers/reactions_controller.rb index 5e0384e7..215adf27 100644 --- a/app/controllers/reactions_controller.rb +++ b/app/controllers/reactions_controller.rb @@ -16,11 +16,11 @@ class ReactionsController < ApplicationController def create params.require :id - target = target_class.find_by!(id: params[:id]) + target = target_class.find(params[:id]) UseCase::Reaction::Create.call( source_user: current_user, - target: + target:, ) target.reload @@ -40,11 +40,11 @@ class ReactionsController < ApplicationController def destroy params.require :id - target = target_class.find_by!(id: params[:id]) + target = target_class.find(params[:id]) UseCase::Reaction::Destroy.call( source_user: current_user, - target: + target:, ) target.reload