Class: Stratify::Activity

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Paranoia, MongoidExtension::NaturalKey, Renderable
Defined in:
lib/stratify/activity.rb

Instance Method Summary collapse

Methods included from Renderable

included, #presenter, #to_html

Methods included from MongoidExtension::NaturalKey

included

Instance Method Details

#created_onObject



23
24
25
26
# File 'lib/stratify/activity.rb', line 23

def created_on
  return nil unless created_at
  created_at.to_date
end

#duplicate?Boolean

Returns:

  • (Boolean)


28
29
30
31
# File 'lib/stratify/activity.rb', line 28

def duplicate?
  duplicate_activities = self.class.where(natural_key_hash)
  duplicate_activities.exists? || duplicate_activities.deleted.exists?
end


19
20
21
# File 'lib/stratify/activity.rb', line 19

def permalink
  nil
end