Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User
- has_many :posts
- end
- user.as_json(include: {posts: {include: :comments})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement