Одно быстрое дополнительное, которое я не видел, но что я делаю часто: скопируйте таблицу Ваш, обновляют. Я делаю это при наличии базы данных для содержания этих резервных копий. Я могу тогда записать:
select *
into MyBackupDb..PeterTableName2008_09_28BeforeABigUpdate
Это делает восстановление после ошибок намного быстрее в будущем (когда полное восстановление не практично).
You should look at ActiveModel::Dirty module: You should be able to perform following actions on your Claim model:
claim.status_changed? # returns true if 'status' attribute has changed
claim.status_was # returns the previous value of 'status' attribute
claim.status_change # => ['old value', 'new value'] returns the old and
# new value for 'status' attribute
claim.name = 'Bob'
claim.changed # => ["name"]
claim.changes # => {"name" => ["Bill", "Bob"]}
Oh! the joys of Rails!
I recommend you have a look at one of the available state machine plugins:
Either one will let you setup states and transitions between states. Very useful and easy way of handling your requirements.