Module PaperTrail::Rails::Controller
In: lib/paper_trail/frameworks/rails/controller.rb

Methods

Public Class methods

Protected Instance methods

Returns any information about the controller or request that you want PaperTrail to store alongside any changes that occur. By default this returns an empty hash.

Override this method in your controller to return a hash of any information you need. The hash‘s keys must correspond to columns in your `versions` table, so don‘t forget to add any new columns you need.

For example:

    {:ip => request.remote_ip, :user_agent => request.user_agent}

The columns `ip` and `user_agent` must exist in your `versions` # table.

Use the `:meta` option to `PaperTrail::Model::ClassMethods.has_paper_trail` to store any extra model-level data you need.

Returns `true` (default) or `false` depending on whether PaperTrail should be active for the current request.

Override this method in your controller to specify when PaperTrail should be off.

Returns the user who is responsible for any changes that occur. By default this calls `current_user` and returns the result.

Override this method in your controller to call a different method, e.g. `current_person`, or anything you like.

[Validate]