title: Hooking Observers with Events
body: <p>We are using AASM in quite a few of our models, but we're looking at simplifying a bit the models. One of the things we'd like to do is to move all the Notification stuff out of the models and into Observers.</p>
  
  <p>So considering:</p>
  
  <pre><code>class ClarificationRequest &lt; ActiveRecord::Base
    include AASM
  
    aasm_initial_state :open
  
    # States
    aasm_state :open
    aasm_state :closed
  
    # Events
    aasm_event :close, :after =&gt; :notify_closed do transitions :to =&gt; :closed, :from =&gt; [:open,:replied], :guard =&gt; :can_close? end
  end
  </code></pre>
  
  <p>I've tried this, but with no luck:</p>
  
  <pre><code>class ClarificationRequestObserver &lt; ActiveRecord::Observer
    observe :clarification_request
  
    def after_close
      puts '############### message from observer!!!!!'
    end
  end
  </code></pre>
  
  <p>How can I move the :notify_closed to an Observer?</p>
  
  <p>Thx!</p>
  
  <p>.Karim</p>