If I try and change the state of an unsaved object I get the following error. If I first save the object then do the call it is fine... is this a known bug or am I doing something wrong? (most likely the latter!)
pt.accept!
NoMethodError: You have a nil object when you didn't expect it! The error occurred while evaluating nil.to_sym from vendor/plugins/acts_as_state_machine/lib/ acts_as_state_machine.rb:151:in `current_state' from vendor/plugins/acts_as_state_machine/lib/ acts_as_state_machine.rb:92:in `next_states' from vendor/plugins/acts_as_state_machine/lib/ acts_as_state_machine.rb:92:in `select' from vendor/plugins/acts_as_state_machine/lib/ acts_as_state_machine.rb:92:in `next_states' from vendor/plugins/acts_as_state_machine/lib/ acts_as_state_machine.rb:96:in `fire' from vendor/plugins/acts_as_state_machine/lib/ acts_as_state_machine.rb:206:in `accept!'