Cyber
Cyber

Reputation: 5000

History maintaining in Rails 3

I have a User Model which has many fields including weight of the user. Admin user can change the weight of a particular user at any time. Is it possible to maintain weight history of a particular user.

Upvotes: 0

Views: 102

Answers (2)

gcastro
gcastro

Reputation: 6276

There's nothing built-in to do model versioning but there are a bunch of gems that could help you. I suggest looking at paper_trail and vestal_versions.

Ryan Bates has some good screencasts covering some of the functionality:

I'd suggest focusing on paper_trail as it's still being maintained.

Upvotes: 1

Philip Hallstrom
Philip Hallstrom

Reputation: 19879

It's possible. Not without whipping up some code or using a gem. I'd suggest you take a look through some of these... Papertrail in particular seems to be very popular.

https://www.ruby-toolbox.com/categories/Active_Record_Versioning

Upvotes: 0

Related Questions