# Help with acts\_as\_audited

**URL:** <https://www.ruby-forum.com/t/help-with-acts-as-audited/161047>\
**Category:** Rails\
**Created:** [February 22, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/help-with-acts-as-audited/161047 "2009-02-22T21:10:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![di3go](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a9a28c/32.png) [@di3go](https://www.ruby-forum.com/u/di3go)\
**Post date:** [February 22, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/help-with-acts-as-audited/161047/1 "2009-02-22T21:10:44Z")

</div>

Hi everyone,

Im using the plugin acts\_as\_audited to audit my whole program, but i  
have a problem, when the change is in a association table (has and  
belongs to many) the change isnt captured by the plugin, anyone know  
any fast hot fix to this?

Thanks!

---

<div class="post-metadata">

**Author:** ![di3go](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a9a28c/32.png) [@di3go](https://www.ruby-forum.com/u/di3go)\
**Post date:** [April 8, 2009, 2:58pm UTC](https://www.ruby-forum.com/t/help-with-acts-as-audited/161047/2 "2009-04-08T14:58:13Z")

</div>

Sounds like you may need to create a model over the associationlike  
cats\_dogs.rb:

class CatDog \< ActiveRecord::Base  
…  
end

You’ll probably need to extend your habtm table with an auto-increment  
surrogate key so that acts\_as\_audited can play well with the “primary  
key”

Peter F.  
(847) 687-7646  
Email: removed\_email\_address@domain.invalid  
IM GTalk: peter.fitzgibbons  
IM Yahoo: pjfitzgibbons  
IM MSN: removed\_email\_address@domain.invalid  
IM AOL: removed\_email\_address@domain.invalid

On Sun, Feb 22, 2009 at 3:10 PM, Diego B. \<
