Skip to content

Associations through nested JSON response #149

@srozen

Description

@srozen

Hello, is there a way to make the association definition to pick up nested resources from the JSON payload?

Let's say we have a Shop model with Articles and Employees, but the JSON payload when fetching the Shop is the following :

{ 
  "id": 1,
  "resources": {
    "employees": [],
    "articles": [],
  }
}

How could one define the has_many such that shop.employees returns the Spyke association?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions