diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-17 22:15:27 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-17 22:15:27 -0700 |
commit | a6146d2e89739e0ae09dbbb755aad6d5b2018dc3 (patch) | |
tree | 485a53a8e55c195a4e549e853437e9c2959f00d0 /app | |
parent | 061d77f7ca949b55c313c1cbbd7b48e65f0aa569 (diff) | |
download | rails-a6146d2e89739e0ae09dbbb755aad6d5b2018dc3.tar.gz rails-a6146d2e89739e0ae09dbbb755aad6d5b2018dc3.tar.bz2 rails-a6146d2e89739e0ae09dbbb755aad6d5b2018dc3.zip |
First end-to-end rickety test
Diffstat (limited to 'app')
-rw-r--r-- | app/models/action_mailroom/inbound_email.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/action_mailroom/inbound_email.rb b/app/models/action_mailroom/inbound_email.rb index 755d7be138..62614abb95 100644 --- a/app/models/action_mailroom/inbound_email.rb +++ b/app/models/action_mailroom/inbound_email.rb @@ -1,7 +1,9 @@ +require "mail" + class ActionMailroom::InboundEmail < ActiveRecord::Base self.table_name = "action_mailroom_inbound_emails" - has_one_attached :raw_message + has_one_attached :raw_email enum status: %i[ pending processing delivered failed bounced ] @@ -9,7 +11,7 @@ class ActionMailroom::InboundEmail < ActiveRecord::Base def mail - @mail ||= Mail.new(Mail::Utilities.binary_unsafe_to_crlf(raw_message.download)) + @mail ||= Mail.new(Mail::Utilities.binary_unsafe_to_crlf(raw_email.download)) end private |