ruby-grape / ruby-grape/grape-entity
one should be able to change env variables when exposing a collection (nesting) with :using option
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 729
- Forks
- 154
- PR merge metrics
- No merged PRs in 30d
Description
At the moment when one sets :type when calling #present helper method, that type is not going to change throughout nested entities. It should though.
For example: when exposing a nested entity, one might not want it to have the same type set when #present helper method is called.
Also check bug #93.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the #present helper and its :using option, then compare the requested nested-entity behavior with bug #93. Trace how :type is passed into nested entities and confirm that an explicitly selected nested type can differ from the parent while exposing a collection; the related behavior should be covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100