Links
Acts as Changed
Categories
Acts as Changed
Specifies only the changed fields when updating the database record.
Vitals
| Repository | http://svn.viney.net.nz/things/rails/plugins/acts_as_changed/ |
|---|---|
| License | Rails' (MIT) |
| Tags |
Commentable
|
| Rating | (5 votes) |
| Owner | Jonathon Viney |
| Created | 31 July 2006 |
Comments
-
This plugin could do with a couple of fixes as of 02 Aug 06. It should have a 'return(true) unless changed?' at the beginning of update_without_callbacks(), and should not freeze every attribute -- this should be explicit. Other than that, it is very useful! I just hook it straight into AR::Base and my logs are much cleaner.
-
This plugin could do with a couple of fixes as of 02 Aug 06. It should have a 'return(true) unless changed?' at the beginning of update_without_callbacks(), and should not freeze every attribute -- this should be explicit. Other than that, it is very useful! I just hook it straight into AR::Base and my logs are much cleaner.
-
"It should have a 'return(true) unless changed?'"
Quite correct. I've updated that.
The attribute freezing is done quite purposefully. If you modify attributes in-place the changes are not tracked, which could lead to data not being saved. And, apart from serializable attributes, there's no real need for in-place modification anyway.

