Audit Record

A simple gem built for Rails 3+ which creates an audit record when users trigger events you flag. The events you can trigger audit on are:

  1. When attributes changing in a model

  2. When specific methods of a class are executed

  3. When you trigger an AuditRecord through code as part of a manual audit process

Installation

In Gemfile:

gem “audit_record”

In your application root, run:

$ bundle install

Generate the migration:

After running one of the generators: $ rake db:migrate

Usage

class User < ActiveRecord::Base
  audit :attributes => [:name, :is_admin], :methods => [:unlock_account!, :destroy]
end

Contributing to audit

Special Thanks

Much of Audit was inspired by acts_as_audited, which is a fine gem in its own right. github.com/collectiveidea/acts_as_audited

However, my goal was to strip features down as much as possible and lock audits (where possible) to the model methods and attributes.

Copyright © 2012 Mark Daggett. See LICENSE.txt for further details.