luckyframework / luckyframework/avram
Raise nicer error if no nested params are in the params sent to a form
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
> **This still needs some thought. Please don't work on this yet**
It can be confusing when using forms in this scenario
https://gitter.im/luckyframework/Lobby?at=59f61f2d5a1758ed0f645e2f
After further thought, I think it should raise a helpful error at runtime, but ALSO raise a compile time error if you try to pass it params and have no allowed any fields
Also consider user `params.nested?` instead of `params.nested!` and only raising when you actually try to *save*. That way you can instantiate a form without nested params, but when you save it, it'll give you an error if the form name is not there.
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 linked Gitter discussion and tracing Avram's form parameter handling, since the issue names no files or tests. Clarify the intended runtime and compile-time behavior, including when validation should occur, before identifying tests that define the completed error behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100