# Users Actions Logging

**URL:** <https://www.ruby-forum.com/t/users-actions-logging/188524>\
**Category:** Rails\
**Created:** [May 13, 2010, 11:08am UTC](https://www.ruby-forum.com/t/users-actions-logging/188524 "2010-05-13T11:08:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vladimir\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/4491bb/32.png) [@Vladimir\_R](https://www.ruby-forum.com/u/Vladimir_R)\
**Post date:** [May 13, 2010, 11:08am UTC](https://www.ruby-forum.com/t/users-actions-logging/188524/1 "2010-05-13T11:08:39Z")

</div>

Hi all,

Is there any gem or plugin available for Users Actions Logging?  
User can create, view, chage, delete some Model and other users should  
be available to see the logs.

I’m ready to use some kind of observers on models, to write Events to  
database.

And second question:  
Should I store all Events in database? Or YAML files or something  
would be preferred?

You thoughs, guys

---

<div class="post-metadata">

**Author:** ![Vladimir\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/4491bb/32.png) [@Vladimir\_R](https://www.ruby-forum.com/u/Vladimir_R)\
**Post date:** [May 13, 2010, 1:33pm UTC](https://www.ruby-forum.com/t/users-actions-logging/188524/2 "2010-05-13T13:33:57Z")

</div>

Vladimir R. wrote:

> Hi all,
> 
> Is there any gem or plugin available for Users Actions Logging?  
> User can create, view, chage, delete some Model and other users should  
> be available to see the logs.
> 
> I’m ready to use some kind of observers on models, to write Events to  
> database.
> 
> And second question:  
> Should I store all Events in database? Or YAML files or something  
> would be preferred?
> 
> You thoughs, guys

I’ve used acts\_as\_audited for this

> **[GitHub - collectiveidea/acts\_as\_audited: acts\_as\_audited is now… Audited.](https://github.com/collectiveidea/acts_as_audited)**
>
> acts\_as\_audited is now… Audited. Contribute to collectiveidea/acts\_as\_audited development by creating an account on GitHub.

changes are stored in the ‘audits’ table where an audit is a standard AR  
object that looks like this:

#\<Audit id: 23555, auditable\_id: 542, auditable\_type: “Student”,  
user\_id: nil, user\_type: nil, username: nil, action: “update”, changes:  
{“times\_logged\_in”=\>[8, 9], “last\_logged\_in”=\>[Wed Nov 18 10:52:05 +0000  
2009, Tue Apr 27 18:03:03 +0100 2010]}, version: 11, created\_at:  
“2010-04-27 18:03:03”\>
