views:

34

answers:

3

What's the standard/best option out there for this kind of version control? The main thing I'm looking for is to track what user edited a record.

I've seen these so far and am wondering what your take is:

A: 

HI @viatropos I thought that these two links might prove to be helpful

http://api.rubyonrails.org/classes/ActiveRecord/Observer.html

http://www.robbyonrails.com/articles/2007/04/27/observers-big-and-small

Rohit
+1  A: 

For stamping user_ids onto rows there is the the userstamp plugin

http://github.com/delynn/userstamp

EDIT:

Based on the requirement mentioned in your comment, I would recommend act_as_audited

http://github.com/collectiveidea/acts_as_audited

We are using it successfully for a very large application.

Peer

Peer Allan
This only adds who did a certain action (updater, deleter, creator), but no track of what was actually updated. But maybe this is enough for the OP?
nathanvda
+1  A: 

The plugins you mentioned all seem to take the same approach, and seem to be somewhat similar in approach: use a seperate table to store the old versions.

None of them seem to be really rails3-ready (looking at the generators), but PaperTrail reportedly should work with rails3, and has the most recent commit.

You could also look at the ruby-toolbox user-stamping and versioning. There you can see which project has the most "traction", which has the most recent commits. Which sometimes can help to make a choice between similar options.

nathanvda
I use papertrail in a Rails 3 project without any issues.
David Lyod