pluginaweek/state_machine — Issue #155: Transitions and conditions
Author: tanelsuurhans
Created: 2012-01-17 11:12:33+00:00
State: open

I have a state machine as follows:

```ruby

event :advance_to_ordered do
transition :to => :ordered
end

event :advance_to_locked do
transition :to => :locked
end

event :advance_to_complete do
transition :to => :completed
end

after_transition :from => :ordered, :to => :locked, :do => :foo
after_transition :from => :ordered, :to => :completed, :do => :foo
```

I'm assuming that the transition hooks should only fire when going from :ordered to :locked or :ordered to :completed, right?
And not fire when going from let's say :locked to :locked etc.
But the thing is that even when i'm doing :advance_to_locked while being in the :locked state, the first transition callback gets called. I tried the option :except_from too, no dice. Is this supposed to work like that?