+If you're using acts_as_audited within Rails, you can simply declare which models should be audited. acts_as_audited can also automatically record the user that made the change if your controller has a <tt>current_user</tt> method.

+

+ class ApplicationController < ActionController::Base

+ audit User, List, Item

+ protected

+ def current_user

+ @user ||= User.find(session[:user])

+ end

+ end

+

+== Customizing

+

+To get auditing outside of Rails, or to customize which fields are audited within Rails, you can explicitly declare <tt>acts_as_audited</tt> on your models:

+

+ class User < ActiveRecord::Base

+ acts_as_audited :except => [:password, :mistress]

+ end

+

+See http://opensoul.org/2006/07/21/acts_as_audited for more information.

+

+== Caveats

+

+Auditing with user support depends on Rails' caching mechanisms, therefore auditing isn't enabled during development mode. To test that auditing is working, start up your app in production mode, or change the following options in config/environments/environment.rb:

+

+ config.cache_classes = true

+ config.action_controller.perform_caching = true

+

+=== ActiveScaffold

+

+Many users have also reported problems with acts_as_audited and ActiveScaffold, which appears to be caused by a limitation in ActiveScaffold not supporting polymorphic associations. To get it to work with ActiveScaffold: