From 7943aa02809ac92b3914de6ac3b259fe4ad121fb Mon Sep 17 00:00:00 2001 From: Molly Struve Date: Fri, 25 Oct 2019 12:40:33 -0500 Subject: [PATCH] Use current_user to avoid looking up the user again via the reaction (#4592) --- app/controllers/reactions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/reactions_controller.rb b/app/controllers/reactions_controller.rb index 64eff2cf6..89102c0e9 100644 --- a/app/controllers/reactions_controller.rb +++ b/app/controllers/reactions_controller.rb @@ -49,7 +49,7 @@ class ReactionsController < ApplicationController category: category, ).first if reaction - reaction.user.touch + current_user.touch reaction.destroy Notification.send_reaction_notification_without_delay(reaction, reaction.reactable.user) Notification.send_reaction_notification_without_delay(reaction, reaction.reactable.organization) if organization_article?(reaction)