Module: PublicActivity::ORM::ActiveRecord::Trackable

Defined in:
lib/public_activity/orm/active_record/trackable.rb

Overview

Implements Trackable for ActiveRecord

See Also:

Class Method Summary collapse

Class Method Details

.extended(base) ⇒ Object

Creates an association for activities where self is the trackable object.



11
12
13
14
15
# File 'lib/public_activity/orm/active_record/trackable.rb', line 11

def self.extended(base)
  base.has_many :activities,
                class_name: '::PublicActivity::Activity',
                as: :trackable
end