Download facenovel/app/views/api/posts/_post.json.jbuilder from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 343 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/facenovel/app/views/api/posts/_post.json.jbuilder
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/facenovel/app/views/api/posts/_post.json.jbuilder
-
curl -L -o _post.json.jbuilder https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/facenovel/app/views/api/posts/_post.json.jbuilder
343 Bytes
| json.extract! post, :id, :author_id, :recipient_id, :body | |
| json.created_at(post.created_at.strftime('%B %e, %Y')) | |
| # if post.images.attached? | |
| # json.set! 'imageUrls' do | |
| # urls = post.images.map do |image| | |
| # url_for(image) | |
| # end | |
| # json.array! urls | |
| # end | |
| # end | |
| json.imageUrl url_for(post.image) if post.image.attached? |