8000 after_commit fires even when a transaction is rolled back · Issue #241 · aasm/aasm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
after_commit fires even when a transaction is rolled back #241
Open
@danielfone

Description

@danielfone

Just want to check whether this is intended behaviour. If so, I think some additional documentation would be helpful to clarify the behaviour of aasm's after_commit callback, since the current behaviour is very counter intuitive. I've written a small example to demonstrate the behaviour below.

Steps to reproduce:

  1. Setup an transition with an after_commit hook
  2. Call the transition from within a transaction
  3. Rollback the transaction

Expected behaviour:

The after_commit hook doesn't fire, since the state change is never committed to the database.

Actual behaviour:

The after_commit hook fires irrespective of the transaction.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0