Skip to content

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.

tomriley/previous_changes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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'

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages