Fix rubocop nits

This commit is contained in:
Andreas Nedbal 2023-11-05 11:45:51 +01:00 committed by Andreas Nedbal
parent 9ce68bffb2
commit 8ddfcef259

View file

@ -16,11 +16,11 @@ class ReactionsController < ApplicationController
def create def create
params.require :id params.require :id
target = target_class.find_by!(id: params[:id]) target = target_class.find(params[:id])
UseCase::Reaction::Create.call( UseCase::Reaction::Create.call(
source_user: current_user, source_user: current_user,
target: target:,
) )
target.reload target.reload
@ -40,11 +40,11 @@ class ReactionsController < ApplicationController
def destroy def destroy
params.require :id params.require :id
target = target_class.find_by!(id: params[:id]) target = target_class.find(params[:id])
UseCase::Reaction::Destroy.call( UseCase::Reaction::Destroy.call(
source_user: current_user, source_user: current_user,
target: target:,
) )
target.reload target.reload