Changeset [77cd065eeb69868e2c8d039cd1fffb070a0bd152] by Tyler Hogan
Revision 77cd065eeb69868e2c8d039cd1fffb070a0bd152,
committed 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...
7 changed files
-
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