public
Fork of collectiveidea/acts_as_audited
Description: acts_as_audited is an ActiveRecord extension that logs all changes to your models in an audits table.
Homepage: http://wiki.github.com/collectiveidea/acts_as_audited
Clone URL: git://github.com/Bantik/acts_as_audited.git
name age message
file .gitignore Sat May 23 14:51:08 -0700 2009 Switch back to TestUnit with Shoulda to get con... [brandon]
file CHANGELOG Tue Jun 02 14:04:55 -0700 2009 Fixed a bug. Nothing to see here. [Bantik]
file LICENSE Mon Feb 23 05:58:59 -0800 2009 Added license [brandon]
file README Tue Jun 02 14:16:03 -0700 2009 Updated README. [Bantik]
file Rakefile Sat May 23 19:12:43 -0700 2009 Add multi_rails again [brandon]
directory generators/ Sun Jun 17 11:02:18 -0700 2007 added revisioning support [brandon]
file init.rb Sat May 17 21:56:58 -0700 2008 refactoring to make compatible with dirty track... [brandon]
directory lib/ Tue Jun 02 14:04:55 -0700 2009 Fixed a bug. Nothing to see here. [Bantik]
directory tasks/ Thu Jul 20 09:41:01 -0700 2006 initial import of acts_as_audited plugin git-s... [brandon]
file test.txt Fri Mar 21 11:58:26 -0700 2008 testing post commit again [brandon]
directory test/ Tue Jun 02 14:12:25 -0700 2009 Updated tests. Alles klar. [Bantik]
README
= acts_as_audited

acts_as_audited is an ActiveRecord extension that logs all changes to your models in an audits table.

This fork addresses an issue that arises when a plugin (such as restful_authentication) provides the _current_user_ 
method to the application controller, causing the audit sweeper to fail to retrieve the current user.

The solution is to explicitly provide a wrapper method for whatever implementation of current_user you have, as shown in 
the usage instructions below.

== Installation

* Install the plugin into your rails app
  If you are using Rails 2.1+:

    script/plugin install git://github.com/Bantik/acts_as_audited.git

* Generate the migration
    script/generate audited_migration add_audits_table
    rake db:migrate

== Usage

Usage instructions from the master branch apply; the only difference is that if you are using the restful_authentication 
plugin, you need to add the following method to your application controller:

  def current_user_for_audit
    @current_user || current_user
  end

See http://github.com/collectiveidea/acts_as_audited/ for full details on the plugin.