title: after_update callback causing never ending loop in a model
body: <p>My model's <code>cropping</code> method is called in a loop which never ends after I update the attributes of user in the controller. </p>
  
  <p><code>User controller code</code>-</p>
  
  <pre><code>   def change_img  
        @user = current_user
  
        #this triggers the model's after_update callback
        @user.update_attributes(params[:user])  
  
        flash[:notice] = "Successfully updated Image."  
        render :action =&gt; 'crop'  
     end  
  </code></pre>
  
  <p><code>User Model code</code>- </p>
  
  <pre><code>after_update :reprocess_avatar, :if =&gt; :cropping? 
  
  
    def cropping?  
     #this method is called infinitely why?
  
    !crop_x.blank? &amp;&amp; !crop_y.blank? &amp;&amp; !crop_w.blank? &amp;&amp; !crop_h.blank? 
  
    end  
  </code></pre>
  
  <p>Once the crop_x, crop_y, crop_w and crop_h are set, the <code>cropping</code> method will always return true which will keep on calling the <code>reprocess_avatar</code> method. This is probably due to the fact that <code>reprocess_avatar</code> method is also updating <code>avatar</code> attribute of user table. And so again <code>after_update</code> triggers causing a loop.</p>
  
  <p>Is there any way to call the method only once after update? </p>