Download app/models/comment.rb from denise-oneill-inbox-ru/Rails-8-API-Image-Processing: direct link, hf CLI and curl.
- Browser
- Download file 267 Bytes
-
https://huggingface.co/spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/resolve/main/app/models/comment.rb
- Command line
-
hf download hf://spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/app/models/comment.rb
-
curl -L -o comment.rb https://huggingface.co/spaces/denise-oneill-inbox-ru/Rails-8-API-Image-Processing/resolve/main/app/models/comment.rb
267 Bytes
| class Comment < ApplicationRecord | |
| include Discard::Model | |
| include Auditable | |
| belongs_to :user | |
| belongs_to :post, counter_cache: true | |
| validates :body, presence: true | |
| def display_body | |
| discarded? ? I18n.t("comments.deleted_placeholder") : body | |
| end | |
| end | |