title: Rails after_save callback being called multiple times
body: <p>I'm trying to inject an after_save callback via a mixin, but my rspec tests are telling me that the callback is being called twice when the <code>create</code> method is called.  Why is the method being called twice?</p>
  
  <p>The following rspec test fails</p>
  
  <pre><code>it 'should call callback' do
    Product.any_instance.should_receive(:update_linkable_attachments).once
    Product.create(:name=&gt;'abc')
  end
  </code></pre>
  
  <p>The failure message is:</p>
  
  <pre><code>Failure/Error: Unable to find matching line from backtrace
     (#&lt;Product:0xb7db738&gt;).update_linkable_attachments(any args)
         expected: 1 time
         received: 2 times
  </code></pre>
  
  <p>Here's the code</p>
  
  <pre><code>module MainModuleSupport
    def self.included(base)
      base.instance_eval("after_save :update_linkable_attachments")
    end 
  
    def update_linkable_attachments
      LinkedAttachment.delay.create_from_attachment self
    end
  end
  
  class Product &lt; ActiveRecord::Base
    include MainModuleSupport
    ...
  
  end
  </code></pre>
  
  <p>The Product class has other code, but does not have any other callbacks.</p>