2023-10-29 13:32:39 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Comments::ReactionsController < ApplicationController
|
2023-10-29 13:48:41 -07:00
|
|
|
def index
|
2023-10-29 13:32:39 -07:00
|
|
|
comment = Comment.find(params[:id])
|
|
|
|
@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
|
|
|
|
end
|