Method: ActionMailer::Preview.call

Defined in:
actionmailer/lib/action_mailer/preview.rb

.call(email, params = {}) ⇒ Object

Returns the mail object for the given email name. The registered preview interceptors will be informed so that they can transform the message as they would if the mail was actually being delivered.



88
89
90
91
92
93
# File 'actionmailer/lib/action_mailer/preview.rb', line 88

def call(email, params = {})
  preview = new(params)
  message = preview.public_send(email)
  inform_preview_interceptors(message)
  message
end