title: Are ActiveRecord callbacks called in the join table in an HABTM relationship?
body: <p>While testing <a href="https://github.com/collectiveidea/acts_as_audited" rel="nofollow">acts_as_audited</a>, I discovered (as also described <a href="https://github.com/collectiveidea/acts_as_audited/issues/72" rel="nofollow">here</a>) that the :with_associations flag does not produce audit table entries for HABTM relationships.</p>
  
  <p>For example:</p>
  
  <pre><code>User &lt; ActiveRecord::Base
    has_and_belongs_to_many: :groups
    acts_as_audited, with_associations: groups
  
  Group &lt; ActiveRecord::Base
    has_and_belongs_to_many: :users
    acts_as_audited, with_associations: users
  </code></pre>
  
  <p>(and tested variations, ie. with/without with_associations)</p>
  
  <p>In the source, one can see that all acts_as_audited does is adds callbacks like before_update and after_create to the audited tables.  Apparently these are not added to the join tables.</p>
  
  <p>I tried making a model like:</p>
  
  <pre><code>GroupsUsers &lt; ActiveRecord::Base
    acts_as_audited
  
    after_save: :test
  
    def test
      logger.debug "test"
    end
  </code></pre>
  
  <p>but did not see any additions to the audit table for CRUD operations on Users or Groups.  I can see the SQL statement acting on the join table in the logs so this suggests that the join table is altered internally in such a way that the normal callbacks are bypassed.  </p>
  
  <p>Is this true?  Any suggestions for getting acts_as_audited to notice the join table or to log HABTM associations?</p>