retrospring/app/controllers/comment_controller.rb
2023-10-15 18:42:30 +02:00

10 lines
261 B
Ruby

# frozen_string_literal: true
class CommentController < ApplicationController
def index
answer = Answer.find(params[:id])
@comments = Comment.where(answer:).includes([{ user: :profile }, :smiles])
render "index", locals: { a: answer }
end
end