Sha256: d1a9a02312318ec0860e0fa9cad7d27ac23fecc6ddaa882db3f472d7920b4774
Contents?: true
Size: 573 Bytes
Versions: 1
Compression:
Stored size: 573 Bytes
Contents
module Georgia module Mailer 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
georgia_mailer-0.8.0 | app/decorators/georgia/mailer/message_decorator.rb |