title: Rails 3 Observer -- looking to learn how to implement an Observer for multiple models
body: <p>I have the following Observer:</p>
  
  <pre><code>class NewsFeedObserver &lt; ActiveRecord::Observer
    observe :photo, :comment
  
    def after_create(record)
    end
  end
  </code></pre>
  
  <p>What'd I'd like to learn how to do is add a SWITCH/IF statement in the after_create, so I know which model was created</p>
  
  <p>Something like:</p>
  
  <pre><code>after_create(record)
  switch model_type
  case "photo"
   do some stuff
  case "comment"
   do some other stuff
  end
  </code></pre>
  
  <p>Or easier to visualize:</p>
  
  <pre><code>if record == 'Photo'
  </code></pre>
  
  <p>How can I take record, and determine the model name? </p>