Files
postter/app/views/posts/_post.json.jbuilder
João Victor Geonizeli aa0e1ac1c7 change json contract
2022-02-28 12:40:17 -03:00

6 lines
238 B
Ruby

json.extract! post, :id, :content, :created_at
json.quoted_post(post.quoted_post, partial: 'posts/quoted_post', as: :post) if post.quoted_post
json.user(post.user, partial: 'posts/user', as: :user)
json.url post_url(post, format: :json)