Files
fizzy/app/views/cards/comments/_comment.json.jbuilder
T
2025-12-10 15:27:56 +01:00

17 lines
434 B
Ruby

json.cache! comment do
json.(comment, :id)
json.created_at comment.created_at.utc
json.updated_at comment.updated_at.utc
json.body do
json.plain_text comment.body.to_plain_text
json.html comment.body.to_s
end
json.creator comment.creator, partial: "users/user", as: :user
json.reactions_url card_comment_reactions_url(comment.card_id, comment.id)
json.url card_comment_url(comment.card_id, comment.id)
end