From 47663fd077d619b0536a3ff9fc4dceb792b16c38 Mon Sep 17 00:00:00 2001 From: Daniel Uber Date: Mon, 1 Nov 2021 13:55:39 -0400 Subject: [PATCH] Show reactions to the user, rather than user created reactions to other users (#15243) * Change display from "created by user" to "reacted to user" The reaction user_id is the creator (who reacted) and not the target (reacting to what). On the user edit page, show reactions to the user, rather than reaction from the user. --- app/controllers/admin/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 2d0bdd67c..691a30951 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -272,7 +272,7 @@ module Admin @related_vomit_reactions = Reaction.where(reactable_type: "Comment", reactable_id: user_comment_ids, category: "vomit") .or(Reaction.where(reactable_type: "Article", reactable_id: user_article_ids, category: "vomit")) - .or(Reaction.where(reactable_type: "User", user_id: @user.id, category: "vomit")) + .or(Reaction.where(reactable_type: "User", reactable_id: @user.id, category: "vomit")) .includes(:reactable) .order(created_at: :desc).limit(15) end