Class: Office::EmailMessage
- Inherits:
-
Object
- Object
- Office::EmailMessage
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/office/email_message.rb
Overview
When I receive one.
Instance Method Summary collapse
- #conv ⇒ Object
- #lead ⇒ Object
-
#object_key ⇒ Object
aka ‘filename’, use with bucket name + prefix.
- #preview_str ⇒ Object
- #received_at ⇒ Object
Instance Method Details
#conv ⇒ Object
50 51 52 |
# File 'lib/office/email_message.rb', line 50 def conv email_conversation end |
#lead ⇒ Object
31 32 33 |
# File 'lib/office/email_message.rb', line 31 def lead Lead.find_by email: from end |
#object_key ⇒ Object
aka ‘filename’, use with bucket name + prefix. I need this!
19 |
# File 'lib/office/email_message.rb', line 19 field :object_key, type: :string |
#preview_str ⇒ Object
54 55 56 57 58 59 |
# File 'lib/office/email_message.rb', line 54 def preview_str body = part_html || part_html || 'Neither part_html nor part_txt!' body = ::ActionView::Base.full_sanitizer.sanitize( body ).gsub(/\s+/, ' ') body = body[0..200] body end |
#received_at ⇒ Object
45 46 47 |
# File 'lib/office/email_message.rb', line 45 def received_at date end |