Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

extracting multiple multiple levels #18

Open
1xch opened this issue Jun 1, 2011 · 0 comments
Open

extracting multiple multiple levels #18

1xch opened this issue Jun 1, 2011 · 0 comments

Comments

@1xch
Copy link

1xch commented Jun 1, 2011

Perhaps not an issue, but a question for something I can't get to work

4 models, each associated to the one above
List
Categories
Items
Item choices

Given aa is a List

bb = aa.to_json(:relationships=>{:categories=>{:include=>[:name],:methods=>[:items]}}) works

but trying to go deeper to Item choices, I've been getting nothing.

This is the closest I've gotten without error, but doesn't actually pull up itemchoices

aa.to_json(:relationships=>{:categories=>{:include=>[:name],:methods=>[:items], :relationships=>{:multiplechoices=>{:include=>[:itemchoices]}}}})

I'm guessing I need to fuddle around a bit more, and wondering if there is some limit or barrier to getting multiple levels, supposing I need to go even more complex, another six levels as an example

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant