From: ErkA Date: 2009-12-10T17:52:21+09:00 Subject: strange StateMachine behaviour hello I've strange problem with state machine in my model state_machine :user_state, :initial => :unconfirmed do state :unconfirmed, :value => 0 state :confirmed, :value => 1 state :trusted, :value => 2 event :verify do transition :unconfirmed => :confirmed end event :trust do transition [ :unconfirmed, :confirmed] => :trusted end end ----------- x ==> #, user_state: 0, created_at: "2009-12-10 06:22:06", updated_at: "2009-12-10 07:46:33", ip: "10.10.10.1"> ----------- x.user_state_transitions ==> [#, #] ----------- events.valid_for(x) ==> [# :confirmed]>, # :trusted]>] -------- and here we go: x.verify! StateMachine::InvalidTransition: Cannot transition user_state via :verify from :unconfirmed x.trust! StateMachine::InvalidTransition: Cannot transition user_state via :trust from :unconfirmed on log Im getting only: SQL (0.0ms) BEGIN SQL (1.8ms) ROLLBACK but if I use x.verify false ==> true what Im doing wrong or where is the problem? best regards ErkA