You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Test
include ::AASM
class LocalStatusEnum < EnumerateIt::Base
associate_values(
:my_first_state,
:my_second_state
)
end
class LocalEventEnum < EnumerateIt::Base
associate_values(
:my_one_event,
:my_other_event
)
end
aasm do
state LocalStatusEnum::MY_FIRST_STATE.to_sym
state LocalStatusEnum::MY_SECOND_STATE.to_sym
event LocalEventEnum::MY_ONE_EVENT.to_sym do
transitions(
from: LocalStatusEnum::MY_FIRST_STATE.to_sym,
to: LocalStatusEnum::MY_SECOND_STATE.to_sym
)
end
end
end
and
class TestSub < Test
aasm do
state :my_third_state
event LocalEventEnum::MY_OTHER_EVENT.to_sym do
transitions(
from: LocalStatusEnum::MY_SECOND_STATE.to_sym,
to: :my_third_state
)
end
end
end
require 'aasm-diagram'
test = TestSub.new
AASMDiagram::Diagram.new(test.aasm, 'test.png')
I did notice changing this line to @aasm_instance.events and calling AASMDiagram::Diagram.new(TestSub.aasm, 'test.png') does work, but calling AASMDiagram::Diagram.new(test.aasm, 'test.png') still does not.
Given two classes:
and
produces
even though I can transition to my_third_state:
If I transition to my_second_state BEFORE diagramming, I get the correct diagram
The text was updated successfully, but these errors were encountered: