2023-03-11 10:48:04 -08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-10-29 13:24:52 -07:00
|
|
|
class CommentsController < ApplicationController
|
2023-03-11 10:48:04 -08:00
|
|
|
def index
|
|
|
|
answer = Answer.find(params[:id])
|
2023-05-07 08:33:46 -07:00
|
|
|
@comments = Comment.where(answer:).includes([{ user: :profile }, :smiles])
|
2023-03-11 10:48:04 -08:00
|
|
|
|
2023-05-05 06:58:19 -07:00
|
|
|
render "index", locals: { a: answer }
|
2023-03-11 10:48:04 -08:00
|
|
|
end
|
|
|
|
end
|