Module: PaperTrailAssociationTracking::ModelConfig

Defined in:
lib/paper_trail_association_tracking/model_config.rb

Overview

Configures an ActiveRecord model, mostly at application boot time, but also sometimes mid-request, with methods like enable/disable.

Instance Method Summary collapse

Instance Method Details

#setup(options = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Set up `@model_class` for PaperTrail. Installs callbacks, associations, “class attributes”, instance methods, and more.


10
11
12
13
14
15
# File 'lib/paper_trail_association_tracking/model_config.rb', line 10

def setup(options = {})
  super

  setup_transaction_callbacks
  setup_callbacks_for_habtm(options[:join_tables])
end