Use proper reaction model class in `CommentController`
This commit is contained in:
parent
1573c2f702
commit
09b0ec6888
|
@ -10,7 +10,7 @@ class CommentController < ApplicationController
|
||||||
|
|
||||||
def show_reactions
|
def show_reactions
|
||||||
comment = Comment.find(params[:id])
|
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?
|
redirect_to answer_path(username: comment.answer.user.screen_name, id: comment.answer.id) unless turbo_frame_request?
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue