retrospring/app/controllers/comments_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
262 B
Ruby
Raw Normal View History

2023-03-11 19:48:04 +01:00
# frozen_string_literal: true
class CommentsController < ApplicationController
2023-03-11 19:48:04 +01:00
def index
answer = Answer.find(params[:id])
2023-05-07 17:33:46 +02:00
@comments = Comment.where(answer:).includes([{ user: :profile }, :smiles])
2023-03-11 19:48:04 +01:00
2023-05-05 15:58:19 +02:00
render "index", locals: { a: answer }
2023-03-11 19:48:04 +01:00
end
end