add user and fix quote_post reference on posts/index
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
json.extract! post, :id, :content, :user_id, :created_at, :updated_at
|
||||
json.url post_url(post, format: :json)
|
||||
json.extract! post, :id, :content, :created_at, :updated_at
|
||||
|
||||
json.quoted_post(post.quoted_post)
|
||||
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.url post_url(post, format: :json)
|
||||
Reference in New Issue
Block a user