Use proper reaction model class in CommentController

This commit is contained in:
Andreas Nedbal 2023-10-28 04:31:35 +02:00 committed by Andreas Nedbal
parent 1573c2f702
commit 09b0ec6888

View file

@ -10,7 +10,7 @@ class CommentController < ApplicationController
def show_reactions
comment = Comment.find(params[:id])
@reactions = Appendable::Reaction.where(parent_type: "Comment", parent: comment.id).includes([{ user: :profile }])
@reactions = Reaction.where(parent_type: "Comment", parent: comment.id).includes([{ user: :profile }])
redirect_to answer_path(username: comment.answer.user.screen_name, id: comment.answer.id) unless turbo_frame_request?
end