Class: MailSpy::Email
- Inherits:
-
Object
- Object
- MailSpy::Email
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- app/models/mail_spy/email.rb
Constant Summary collapse
- @@template_cache =
{}
Instance Method Summary collapse
- #html_erb ⇒ Object
-
#parsed_html_content ⇒ Object
Great for debugging emails.
- #parsed_text_content ⇒ Object
- #template_values ⇒ Object
- #text_erb ⇒ Object
Instance Method Details
#html_erb ⇒ Object
70 71 72 |
# File 'app/models/mail_spy/email.rb', line 70 def html_erb load_template("html.erb") end |
#parsed_html_content ⇒ Object
Great for debugging emails
62 63 64 |
# File 'app/models/mail_spy/email.rb', line 62 def parsed_html_content return MailSpy::CoreMailer.template(self).html_part.body.to_s end |
#parsed_text_content ⇒ Object
66 67 68 |
# File 'app/models/mail_spy/email.rb', line 66 def parsed_text_content return MailSpy::CoreMailer.template(self).text_part.body.to_s end |
#template_values ⇒ Object
57 58 59 |
# File 'app/models/mail_spy/email.rb', line 57 def template_values self.read_attribute(:template_values).try(:with_indifferent_access) end |
#text_erb ⇒ Object
74 75 76 |
# File 'app/models/mail_spy/email.rb', line 74 def text_erb load_template("text.erb") end |