ruby-grape / ruby-grape/grape-roar
Add a CRUD extension
Open
Nobody has claimed this yet.
new feature
- Dominant language
- Ruby
- Stars
- 59
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
See https://github.com/dblock/grape-with-roar/blob/765b6fc0c117e70546161ced37da86cc0e18a8d4/api/extensions/crud_extension.rb, a simple CRUD extension that lets you write API crud in a much more elegant way.
create
spline = create Acme::Models::Spline, with: Acme::Api::Presenters::SplinePresenter, from: params[:spline]
present spline, with: Acme::Api::Presenters::SplinePresenter
update
spline = Acme::Models::Spline.find(params[:uuid])
update spline, with: Acme::Api::Presenters::SplinePresenter, from: params[:spline]
delete
spline = Acme::Models::Spline.find(params[:uuid])
delete spline, with: Acme::Api::Presenters::SplinePresenter
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 by reading the referenced api/extensions/crud_extension.rb implementation and compare its create, update, and delete examples with the grape-roar extension structure. Done means grape-roar provides an equivalent CRUD extension supporting the three demonstrated operations with the shown presenter and parameter usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100