module Timeliner

Constants

VERSION

Public Class Methods

engine() click to toggle source
# File lib/timeliner.rb, line 5
def self.engine
  Engine
end
find(trackable, key) click to toggle source
# File lib/timeliner.rb, line 13
def self.find(trackable, key)
  Activity
    .where(trackable: trackable)
    .where(key: key)
end
last_activity(trackable) click to toggle source
# File lib/timeliner.rb, line 19
def self.last_activity(trackable)
  Activity
    .where(trackable: trackable)
    .order(created_at: :desc)
    .limit(1)
end
track(trackable, key, user=nil) click to toggle source
# File lib/timeliner.rb, line 9
def self.track(trackable, key, user=nil)
  CreateActivity.perform_later(trackable: trackable, key: key, user: user)
end