title: Using pluginaweek's state_machine, can I reference the activerecord object during an event?
body: <p>I'm trying to implement a "suspend" event that transitions the object to the :suspended state.  But I need to be able to "unsuspend", and return to the previous state. I added a previous_state field to the model, but I can't see how to access it inside an event block.</p>
  
  <p>This is the basic logic I'm trying to implement:</p>
  
  <pre><code>event :suspend do
    owner.previous_state = self.state
    transition [:new, :old] =&gt; :suspended
  end
  
  event :unsuspend do
    transition :suspended =&gt; owner.previous_state.to_sym
    owner.previous_state = nil
  end
  </code></pre>
  
  <p>The state_machine docs haven't been very helpful, and I can't find examples online.  Sometimes it's tough to know how to describe something to google :)</p>