title: Rails: check if the model was really saved in after_save
body: <p>ActiveRecord use to call after_save callback each time save method is called even if the model was not changed and no insert/update query spawned.</p>
  
  <p>This is the default behaviour actually. And that is ok in most cases.</p>
  
  <p>But some of the after_save callbacks are sensitive to the thing that if the model was actually saved or not.</p>
  
  <p>Is there a way to determine if the model was actually saved in the after_save?</p>
  
  <p>I am running the following test code:</p>
  
  <pre><code>class Stage &lt; ActiveRecord::Base
    after_save do
      pp changes
    end
  end
  
  s = Stage.first
  s.name = "q1"
  s.save!
  </code></pre>