+
Skip to content

Docs: Reflect usage of AASM event after_commit deprecation in README.md #859

@andyatkinson

Description

@andyatkinson

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:

  1. Load the Readme for the current version of aasm, or any version from 5.1.1 onward
  2. View the Readme section on using after_commit within an event
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载