Class: ActionMailer::Base
- Inherits:
-
Object
- Object
- ActionMailer::Base
- Defined in:
- lib/pdm-rails/ext/action_mailer/base.rb
Instance Method Summary collapse
- #apply_personalization ⇒ Object
-
#render_with_pdm(opts) ⇒ Object
The result of this method is shoved in ‘message.body’.
- #view_assigns_with_pdm ⇒ Object
Instance Method Details
#apply_personalization ⇒ Object
13 14 15 |
# File 'lib/pdm-rails/ext/action_mailer/base.rb', line 13 def apply_personalization .personalization = view_assigns_with_pdm end |
#render_with_pdm(opts) ⇒ Object
The result of this method is shoved in ‘message.body’
18 19 20 21 22 23 24 25 26 |
# File 'lib/pdm-rails/ext/action_mailer/base.rb', line 18 def render_with_pdm(opts) if ::Pdm::Rails::Delivery === .delivery_method && .delivery_method.personalization? apply_personalization return opts[:template].source end return render_without_pdm(opts) 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 |