Agile Web Development

Build it. Launch it. Love it.

Acts As Modified

If you find this plugin useful, please consider a donation to show your support!

  http://www.paypal.com/cgi-bin/webscr?cmd=_send-money

  Email address: jonathan.viney@gmail.com

Instructions

This plugin lets you track attribute changes to an ActiveRecord object.

Installation

  script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_modified

Usage

  class Person < ActiveRecord::Base
    acts_as_modified
  end

  p = Person.find(1)
  p.name # => "Jonathan"
  p.modified? # => false
  p.name = "David"
  p.modified? # => true
  p.name_modified? # => true

See ActiveRecord::Acts::Modified::InstanceMethods for details of the all the methods that are available.

Help

Feel free to email with any problems, suggestions, bugs etc…

  jonathan dot viney @ gmail . com
  christopher dot k dot hall @ gmail . com

Credit

Based on the original acts_as_modified plugin by Chris Hall.

Vitals

Repository http://svn.viney.net.nz/things/rails/plugins/acts_as_modified/
License Rails' (MIT)
Tags Tag_red
Rating (5 votes)
Owner Jonathan Viney
Created 3 July 2006

Comments

  • ctran
    24 July 2006

    No longer available?

  • knox
    26 November 2007

    whats the difference to ActiveRecordChanged ?

  • Avatar
    Jan
    6 June 2008

    not needed since rails 2.1 (http://ryandaigle.com/articles/2008/3/31/what-s-new-in-edge-rails-dirty-objects)

Add a comment