Is there any problem with adding a loop in the state machine for the rails plugin acts_as_state_machine?
I'm trying to do something like this and is not working:
state :not_sent
state :sent
event :test do
transitions :from => :not_sent, :to => :sent
transitions :from => :sent, :to => :sent
end
I want to do this because the state machine is for the state of an email. There more states that the ones that I showed here, but for practical reason I'm just showing the section concerning to the loop.
So now, I would like to add the possibility of resending a message. So I thought in adding a loop to the state machine, but it doesn't work. I try to add I new state "resend", just for debugging purposes and it worked. But I need some way to create a loop in the state machine.