= track_changes TrackChanges is a Rails plugin to facilitate tracking changes made to an ActiveRecord model in your Controller#update actions. By default, the block is only called if the changes hash is not empty. A TrackChanges::Filter is instantiated on each run of the before_filter so it should be thread-safe. Consult the generated rdoc for more information. == Example class PostController < ApplicationController include TrackChanges before_filter :get_post, :except => [:index, :new] track_changes_to :post do |r| # r.changes => Model#changes made during update action RAILS_DEFAULT_LOGGER.debug(r.changes.inspect) end def update if @post.update_attributes(params[:post]) flash[:notice] = "Success." else render :action => "edit" end end # Normal controller actions # ... protected def get_post @post = Post.find(params[:id]) end end == COPYRIGHT Copyright (c) 2008 Matt Haley. See LICENSE for details.