Module Audited::Auditor::ClassMethods
In: lib/audited/auditor.rb

Methods

Included Modules

Audited::Auditor::AuditedInstanceMethods

Public Instance methods

Configuration options

  • only - Only audit the given attributes
  • except - Excludes fields from being saved in the audit log. By default, Audited will audit all but these fields:
      [self.primary_key, inheritance_column, 'lock_version', 'created_at', 'updated_at']
    

    You can add to those by passing one or an array of fields to skip.

      class User < ActiveRecord::Base
        audited :except => :password
      end
    
  • protect - If your model uses attr_protected, set this to false to prevent Rails from raising an error. If you declare attr_accessible before calling audited, it will automatically default to false. You only need to explicitly set this if you are calling attr_accessible after.
  • require_comment - Ensures that audit_comment is supplied before any create, update or destroy operation.
      class User < ActiveRecord::Base
        audited :protect => false
        attr_accessible :name
      end
    

[Validate]