acts_as_audited is an ActiveRecord extension that logs all changes to your models in an audits table.
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 5 commits ahead, 494 commits behind collectiveidea:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
generators/audited_migration
lib
tasks
test
.gitignore
CHANGELOG
LICENSE
README
Rakefile
init.rb
test.txt

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.