Module: PaperTrail::Rails::Controller

Defined in:
lib/mongo_trails/frameworks/rails/controller.rb

Overview

Extensions to rails controllers. Provides convenient ways to pass certain information to the model layer, with ‘controller_info` and `whodunnit`. Also includes a convenient on/off switch, `paper_trail_enabled_for_controller`.

Class Method Summary collapse

Class Method Details

.included(controller) ⇒ Object



10
11
12
13
14
15
# File 'lib/mongo_trails/frameworks/rails/controller.rb', line 10

def self.included(controller)
  controller.before_action(
    :set_paper_trail_enabled_for_controller,
    :set_paper_trail_controller_info
  )
end