luckyframework / luckyframework/avram
Operation callbacks are missing the conditional arguments
Open
Nobody has claimed this yet.
hacktoberfest
- Dominant language
- Crystal
- Stars
- 183
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
With SaveOperation and DeleteOperation you can do before_save :do_thing, if: :valid?, but this doesn't work for before_run or after_run
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 src/avram/callbacks.cr at the linked line and compare how conditional arguments work for before_save with how before_run and after_run are handled. Confirm that the run callbacks accept conditions such as if: :valid?, then verify that both callbacks behave consistently with the save and delete callbacks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- crystal
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100