Agile Web Development

Build it. Launch it. Love it.

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 Tag_red Commentable
Rating (5 votes)
Owner Jonathon Viney
Created 31 July 2006

Comments

  • 2 August 2006

    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.

  • 2 August 2006

    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.

  • Avatar
    Jonathan Viney
    7 August 2006

    "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.

Add a comment