No commit activity in last 3 years
No release in over 3 years
A gem for tracking record changes and controller actions
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 3.0.0
 Project Readme
A gem for tracking model changes and controller actions.

USAGE
Run 'rails generate appmospheres_audit:migration' to generate the migration for the log events.
Run 'rails sappmospheres_audit:config' to generate a configuration initializer (in config/initializers/appmospheres_audit.rb).

Track models with enable_record_tracking:
class User < ActiveRecord::Base
  enable_record_tracking
  ...
end

Track actions with enable_action_tracking:
class MyController < ApplicationController
  enable_action_tracking
  ...
end

The payload of any event log record will be a YAML string. An event log tracking a model will record:
* on create: ID of the newly created record
* on update: list of changes (keys and values), excluding those explicitely filtered by setting Rails.application.config.filter_parameters and/or AppmospheresAudit.filter_parameters.
* on destroy: serialized record, excluding the attributes filtered by setting Rails.application.config.filter_parameters and/or AppmospheresAudit.filter_parameters.

Tracking actions in a controller will create an event log record with the name of the action and the parameters passed to the action, except those filtered by setting Rails.application.config.filter_parameters and/or AppmospheresAudit.filter_parameters.