Skip to content

Present with multiple entities #241

Closed
@adamgotterer

Description

@adamgotterer

The response would be the combination of two entities. I've run into this issue with things like pagination blocks. I've had to hack around with body to get something like:

{
  "users": [...],
  "pagination": {
    "page": 1,
    "num_pages": 1000
  }
}

Would be interesting to have a "present multi" feature. Maybe something along the lines of:

present_multi [[ @coupons, with: Entities::Users], [ @pagination, with: Entities::Pagination, root: 'pagination' ]]

Would love to start a discussion and hear other peoples thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions