[Rails] Users Actions Logging

14 views
Skip to first unread message

Vladimir Rybas

unread,
May 13, 2010, 5:07:05 AM5/13/10
to Ruby on Rails: Talk
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

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Max Williams

unread,
May 13, 2010, 7:33:57 AM5/13/10
to rubyonra...@googlegroups.com
Vladimir Rybas 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
http://github.com/collectiveidea/acts_as_audited

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">
--
Posted via http://www.ruby-forum.com/.

Sunanda Roy

unread,
Jan 31, 2018, 7:35:08 AM1/31/18
to Ruby on Rails: Talk

Hi,

You should maintain audit for this. And "acts_as_audited" gem provides an active record extension using which you can track the update , create, destroy actions on a model

thanks,
Sunanda
Reply all
Reply to author
Forward
0 new messages