Module: MailLogger::App::Models::MailLog::ClassMethods
- Defined in:
- lib/mail_logger/app/models/mail_log.rb
Instance Method Summary collapse
Instance Method Details
#create_from_mail(email) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/mail_logger/app/models/mail_log.rb', line 10 def create_from_mail(email) ensure_object_is_email(email) ensure_required_attributes_are_assigned(email) self.create(:to => email.to.join(", "), :from => email.from.join(", "), :subject => email.subject, :body => email.quoted_body, :message => email.encoded) end |