Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Very simple Rails plugin that adds a previous_changes method to ActiveRecord objects that returns changes made during the previous save. Note that this functionality is scheduled to be built-in to Rails 3.0.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
README
init.rb
previous_changes.gemspec

README

Very simple Rails plugin that adds the method 'previous_changes' to ActiveRecord objects that can be called after saving a model object to fetch what the method 'changes' would have returned just before the save occurred (a hash from attribute name to a pair of values - the old attribute value and the new attribute value).

Installation
------------

$ gem sources -a http://gems.github.com (you only have to do this once)
$ sudo gem install tomriley-previous_changes

Then add a dependency to your rails environment.rb:

config.gem 'tomriley-previous_changes', :lib => 'previous_changes', :version => '0.0.1'
Something went wrong with that request. Please try again.