Forum: Ruby on Rails recording updates

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
4904de38aabb5e2052f6ee5f153b7472?d=identicon&s=25 Kevin Davis (Guest)
on 2006-01-17 01:27
(Received via mailing list)
I've been searching around trying to find out if there is some way to
something to an ActiveRecord class such that every time an update is
a record of that update (which fields, when) is created. I think it
would be
useful for syncing information with external services I think.

If there is a wealth of knowledge on this, what search terms will lead
me in
the right direction?
If there isn't something like this in rails, do people have thoughts on
best implementation approach?
Would RoR users be able to use such a service if I were to get my hands
dirty and write it up?
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-01-17 03:34
(Received via mailing list)

-- Tom Mornini
97cbca14d17274370cce501bbea7980a?d=identicon&s=25 Mike Harris (Guest)
on 2006-01-21 15:40
(Received via mailing list)
to "hook into" rails, i.e. to specify code to be run everytime (for
example) an object is saved, use callbacks.

The code to do what you want manually would be a simple matter of
writing a method to do it, and registering your method with a callback.
The "updates" table would probably be a seperate model mapped to a
seperate table, and your main model would create and save a new one when
it itself was saved.

To do it automatically (by declaring the model "acts_as_change_logging,"
to use an unimaginative example) would be more work, but certainly
This topic is locked and can not be replied to.