Module: PaperTrail::Rails::Controller

Defined in:
lib/paper_trail/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, enabled_for_controller.

Class Method Summary collapse

Class Method Details

.included(controller) ⇒ Object



7
8
9
10
11
12
# File 'lib/paper_trail/frameworks/rails/controller.rb', line 7

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