-
Notifications
You must be signed in to change notification settings - Fork 645
Description
Describe the bug
When using after_commit
in the scope of an AASM event, a deprecation message is presented explaining an additional gem should be added. Thus, it seems like the use of this is deprecated, meaning new code should not use this.
Added here: #696
However, the usage of after_commit
in the Readme does not reflect the deprecation. This is confusing. Readers of this would begin using this functionality and then immediately see the deprecation message.
If the usage of after_commit
in this context is deprecated, then that should be reflected in the Readme. Ideally, an alternative that doesn't have the race conditions mention is also provided, so that users can migrate their code.
To Reproduce
Steps to reproduce the behavior:
- Load the Readme for the current version of aasm, or any version from 5.1.1 onward
- View the Readme section on using after_commit within an event
- Note that there's no mention of this functionality being deprecated
Expected behavior
The Readme indicates this is deprecated. Ideally, an alternative is provided.
Additional context
- Currently we're using version 5.2.0 of aasm, and have recently removed after_commit_everywhere, thus the deprecation warning message is being printed.
- Issue related to the same topic: Revisit "Add :after_commit callbacks to events" #846