change json contract

This commit is contained in:
João Victor Geonizeli
2022-02-28 12:40:17 -03:00
parent bf3253dc9e
commit aa0e1ac1c7
4 changed files with 14 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
json.extract! post, :id, :content, :created_at, :updated_at
json.extract! post, :id, :content, :created_at
json.quoted_post(post.quoted_post, partial: 'posts/post', as: :post) if post.quoted_post
json.user(post.user, partial: 'users/user', as: :user) if post.user
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)