Class: ActionMailer::Base
- Inherits:
-
Object
- Object
- ActionMailer::Base
- Defined in:
- lib/pdm-rails/ext/action_mailer/base.rb
Instance Method Summary collapse
- #assign_pdm_template(template) ⇒ Object
- #render_with_pdm(opts) ⇒ Object
- #view_assigns_with_pdm ⇒ Object
Instance Method Details
#assign_pdm_template(template) ⇒ Object
13 14 15 16 17 |
# File 'lib/pdm-rails/ext/action_mailer/base.rb', line 13 def assign_pdm_template(template) return unless template.formats.include?(:html) .template_html = template.source .template_assigns = view_assigns_with_pdm end |
#render_with_pdm(opts) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pdm-rails/ext/action_mailer/base.rb', line 19 def render_with_pdm(opts) unless ::Pdm::Rails::Delivery === .delivery_method return render_without_pdm(opts) end if .delivery_method.personalization? assign_pdm_template(opts[:template]) end "" # The result of this method is shoved in 'body' end |
#view_assigns_with_pdm ⇒ Object
6 7 8 9 10 |
# File 'lib/pdm-rails/ext/action_mailer/base.rb', line 6 def view_assigns_with_pdm view_assigns_without_pdm.tap do |view_assigns| view_assigns.delete("_message") end end |