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

extracting multiple multiple levels #18

@1xch

Description

@1xch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions