Changeset [6dd484fb95dd74212b835fa0218a3a0795f987b5] by Michael Xavier

July 25th, 2014 @ 12:05 PM

Fix stack level too deep error due to namespacing

If you have a state machine with a "failed" event and you transition it
and it fails to transition, AASM will call the "failed" method it
defines but will hit your transition instead and blow the stack.

All other methods in AASM are prefixed with AASM to avoid this, so this
patch does the same thing with the private methods failed and fired.
https://github.com/aasm/aasm/commit/6dd484fb95dd74212b835fa0218a3a0...

Committed by Michael Xavier

  • A spec/unit/event_naming_spec.rb
  • M lib/aasm/aasm.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Library for adding state machines to Ruby classes. Includes persistence layers for things like ActiveRecord. Formerly known as acts_as_state_machine.