Changeset [77cd065eeb69868e2c8d039cd1fffb070a0bd152] by Tyler Hogan
March 8th, 2017 @ 01:58 AM
Deep clone state machine during inheritance (with tests) (#429)
-
Deep clone state machine during inheritance. Allows child classes to extend the parent state machine without modifying the parents state machine.
-
Add tests
-
Also need to clone global callbacks to support inheritance
-
Added tests to ensure parent is not changed in inheritance https://github.com/aasm/aasm/commit/77cd065eeb69868e2c8d039cd1fffb0...
Committed by Tyler Hogan
- M lib/aasm/core/event.rb
- M lib/aasm/core/state.rb
- M lib/aasm/core/transition.rb
- M lib/aasm/state_machine.rb
- M spec/models/sub_class.rb
- M spec/unit/subclassing_multiple_spec.rb
- M spec/unit/subclassing_spec.rb
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.