Sha256: a7f28475bd7973312efd7b674a27df02d804804a2a0d606a70f2a370987a2f18
Contents?: true
Size: 639 Bytes
Versions: 55
Compression:
Stored size: 639 Bytes
Contents
module ThinkFeelDoEngine # Labels the sender and recipient of a message. module Addressable def from(user = nil) if sender.id == user.try(:id) "You" elsif sender.try(:study_id) sender.study_id elsif recipient.try(:active_group).try(:arm).try(:has_woz?) "Moderator" else "Coach" end end def to(user = nil) if recipient.id == user.try(:id) "You" elsif recipient.try(:study_id) recipient.study_id elsif sender.try(:active_group).try(:arm).try(:has_woz?) "Moderator" else "Coach" end end end end
Version data entries
55 entries across 55 versions & 1 rubygems