title: Rails detect if Attribute Changed Before Update - SystemStackError: stack level too deep
body: <p>I want to detect whether an attribute has changed before a model has updated.</p>
  
  <p>I have the following (based on:<a href="http://api.rubyonrails.org/classes/ActiveModel/Dirty.html" rel="nofollow">http://api.rubyonrails.org/classes/ActiveModel/Dirty.html</a>):</p>
  
  <pre><code>before_update :changed_attributes
  
  def changed_attributes
      self.path_changed? ? puts('Path was changed') : puts('Path was not changed')
  end
  </code></pre>
  
  <p>But now when i try t edit the Model.path attribute I get the following error:</p>
  
  <pre><code>SystemStackError: stack level too deep
  </code></pre>
  
  <p>Which I'm told means an infinite recursion is occurring. </p>
  
  <p>What's the correct way to do this and without creating the SystemStackError?</p>