nicklandgrebe / active-resource.js

ActiveResource.js - API resource relational mapping in JavaScript
https://active-resource.js.org
MIT License
133 stars 20 forks source link

Are nested includes supported? #28

Closed nozpheratu closed 6 years ago

nozpheratu commented 6 years ago

Just wondering if nested includes using the dot-separator were supported?

Example:

GET /articles/1?include=comments.author
nicklandgrebe commented 6 years ago

Yes, it is in the docs but admittedly it could be pointed out better:

Product.includes('orders', merchant: ['currency']).all()

translates to:

GET /products?include=orders,merchant.currency