luckyframework / luckyframework/avram
has_one should have automatic validator
Nobody has claimed this yet.
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Given model A which has_one model B, not nilable; and model B which belongs_to model A, the foreign key is in Model B. Model A does not automatically validate that Model B exists before it is saved, but it should. For context, see https://gitter.im/luckyframework/Lobby?at=5ec87bab2280c80cbfc19651
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 locating the association and validation entry points for has_one and belongs_to, then reproduce the Model A/Model B case described in the issue. Done means a non-nilable has_one relationship automatically validates that its belongs_to target exists before saving.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100