Class: EmailTemplate
- Inherits:
-
Email
- Object
- EmailTemplate
- Defined in:
- app/models/email_template.rb
Overview
An “Email” that isn’t intended to be sent, but rather as a prototype for other Emails to be generated from.
Instance Method Summary collapse
Instance Method Details
#as_json(options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'app/models/email_template.rb', line 10 def as_json( = {}) {}.tap do |hash| hash[:to] = recipient.email hash[:reply_to] = reply_email hash[:from] = from_email hash[:subject] = render(:subject) hash[:html_body] = render(:html_body) hash[:text_body] = render(:text_body) end end |