title: Rails: attribute_changed?
body: <p>I have a model that has an <code>amount</code> and I'm tracking to see if this amount is changed with a <code>Model.amount_changed?</code> with a <code>before_save</code> which works fine but when I check to see <code>amount_was</code> and <code>amount_change?</code> it only returns the updated amount not the previous amount. And all this is happening before it is save. It knows when the attribute is changed but it will not return the old value.</p>
  
  <p>Ideas?</p>
  
  <pre><code>class Reservation &lt; ActiveRecord::Base
  
  before_save  :status_amount, :if =&gt; :status_amount_changed
  
  def status_amount_changed
    if self.amount_changed? &amp;&amp; !self.new_record?
      true
    else
      false
    end
  end
  
  def status_amount
      title = "Changed Amount"
      description = "to #{self.amount_was} changed to #{self.amount} units"
      create_reservation_event(title, description)
  end
  
  def create_reservation_event(title, description)
      Event.create(:reservation =&gt; self, :sharedorder =&gt; self.sharedorder, :title =&gt; title,     :description =&gt; description, :retailer =&gt; self.retailer )
  end
  
  end
  </code></pre>