Module: RefererTracking

Defined in:
lib/referer_tracking.rb,
lib/referer_tracking/engine.rb,
lib/referer_tracking/version.rb,
app/models/referer_tracking/referer_tracking.rb

Defined Under Namespace

Modules: ControllerAddons, TrackableModule Classes: Engine, RefererTracking, Sweeper

Constant Summary collapse

VERSION =
"3.1.0"

Class Method Summary collapse

Class Method Details

.add_tracking_to(*models_list) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/referer_tracking.rb', line 15

def self.add_tracking_to(*models_list)
  models_list.each do |model|
    model.class_eval do
      include RefererTracking::TrackableModule
    end
  end

  RefererTracking::Sweeper.class_eval do
    observe models_list
  end
end