Skip to content

Document application-local CRUD with validated writable fields - #49

Merged
dblock merged 1 commit into
ruby-grape:masterfrom
dblock:docs/crud-recipe-8
Oct 27, 2026
Merged

dblock merged 1 commit into
ruby-grape:masterfrom
dblock:docs/crud-recipe-8

Conversation

@dblock

@dblock dblock commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Fixes #8.

Keep CRUD application-local rather than adding a persistence API or globally patching endpoints. Provide a complete recipe with separate input/output decorators, Grape parameter validation, filtered writable fields, partial updates, and explicit save!/destroy! calls. Explain authorization, ORM adaptation, and application-owned error mapping.

Use resource-oriented names: ProductInputRepresenter, ProductOutputRepresenter, and ProductsAPI. Apply the corresponding naming cleanup to the parameter example introduced by the now-merged #48, keeping the standalone examples and their scoped test constants consistent. Rebased onto current master; the legacy JSON compatibility prerequisite is already upstream.

Execute the exact README examples in actual HTTP requests. CRUD cases verify create/update/delete, readonly and undeclared fields, partial updates, invalid input, and propagated persistence failures. The complete suite and lint pass on Ruby 2.7/Grape 1.8 and Ruby 4/Grape 4.

AI-authored on behalf of @dblock.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Danger Report

No issues found.

View run

@dblock
dblock force-pushed the docs/crud-recipe-8 branch 2 times, most recently from 8ce2af5 to 0041dce Compare October 27, 2026 10:44
@dblock
dblock force-pushed the docs/crud-recipe-8 branch from 0041dce to f38efd1 Compare October 27, 2026 11:35
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock
dblock force-pushed the docs/crud-recipe-8 branch from f38efd1 to 7e497a0 Compare October 27, 2026 11:38
@dblock
dblock merged commit 695ff98 into ruby-grape:master Oct 27, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a CRUD extension

1 participant