class Plugin::Activity::Activity

Public Instance Methods

children() click to toggle source
# File core/plugin/activity/model/activity.rb, line 34
def children
  self[:children] || []
end
created() click to toggle source

TLに表示するため

# File core/plugin/activity/model/activity.rb, line 44
def created
  date
end
host() click to toggle source
# File core/plugin/activity/model/activity.rb, line 48
def host
  kind.gsub('_', '-')
end
name() click to toggle source

TLに表示するため

# File core/plugin/activity/model/activity.rb, line 39
def name
  title
end
path() click to toggle source
# File core/plugin/activity/model/activity.rb, line 52
        def path
  if identity
    identity
  elsif children.empty?
    '/' + SecureRandom.uuid
  else
    children.inject('/'){|memo,child| memo + Digest::MD5.hexdigest(child.uri.to_s) + '/' }
  end
end
plugin() click to toggle source
# File core/plugin/activity/model/activity.rb, line 26
def plugin
  self[:plugin] || Plugin[plugin_slug]
end
profile_image_url() click to toggle source

TLにアイコンを表示するため

# File core/plugin/activity/model/activity.rb, line 22
def profile_image_url
  icon || MUI::Skin.get_path('activity.png')
end
title() click to toggle source
# File core/plugin/activity/model/activity.rb, line 30
def title
  self[:title].tr("\n", "")
end