Class: WorkActivity::Message

Inherits:
BaseMessage show all
Defined in:
app/models/work_activity.rb

Constant Summary

Constants inherited from Renderer

Renderer::DATE_FORMAT, Renderer::DATE_TIME_FORMAT, Renderer::SORTABLE_DATE_TIME_FORMAT, Renderer::UNKNOWN_USER

Instance Method Summary collapse

Methods inherited from BaseMessage

#body_html, #mark_down_to_html, #user_refernces

Methods inherited from Renderer

#created_sortable_html, #created_updated_html, #initialize, #to_html

Constructor Details

This class inherits a constructor from WorkActivity::Renderer

Instance Method Details

#created_by_user_htmlObject

Override the default:



281
282
283
284
285
286
# File 'app/models/work_activity.rb', line 281

def created_by_user_html
  return UNKNOWN_USER unless @work_activity.created_by_user

  user = @work_activity.created_by_user
  "#{user.given_name_safe} (@#{user.uid})"
end

#title_htmlObject



288
289
290
# File 'app/models/work_activity.rb', line 288

def title_html
  "<span class='activity-history-title'>#{created_by_user_html} at #{created_updated_html}</span>"
end