Sha256: 824717df29ecf9643e1ac7f0bc617794791c929c2876146a780a535cb5b1b435
Contents?: true
Size: 521 Bytes
Versions: 4
Compression:
Stored size: 521 Bytes
Contents
module Georgia class MessageDecorator < Georgia::ApplicationDecorator def phone_or_none phone.present? ? phone : h.content_tag(:span, 'no phone', class: 'muted') end def subject_truncated h.truncate(h.strip_tags(subject), length: 60, separator: ' ').html_safe if subject.present? end def message_truncated h.truncate(h.strip_tags(message), length: 200, separator: ' ').html_safe if message.present? end def name_or_anonymous name || 'Anonymous' end end end
Version data entries
4 entries across 4 versions & 1 rubygems