- A
- C
- E
- F
- N
- P
Attributes
| [R] | params |
Class Public methods
all() Link
Returns all mailer preview classes.
Source: show
# File actionmailer/lib/action_mailer/preview.rb, line 104 def all load_previews if descendants.empty? descendants end
call(email, params = {}) Link
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.
Source: show
# File actionmailer/lib/action_mailer/preview.rb, line 112 def call(email, params = {}) preview = new(params) message = preview.public_send(email) inform_preview_interceptors(message) message end
email_exists?(email) Link
Returns true if the email exists.
Source: show
# File actionmailer/lib/action_mailer/preview.rb, line 125 def email_exists?(email) emails.include?(email) end
emails() Link
Returns all of the available email previews.
Source: show
# File actionmailer/lib/action_mailer/preview.rb, line 120 def emails public_instance_methods(false).map(&:to_s).sort end
exists?(preview) Link
Returns true if the preview exists.
Source: show
# File actionmailer/lib/action_mailer/preview.rb, line 130 def exists?(preview) all.any? { |p| p.preview_name == preview } end
find(preview) Link
Find a mailer preview by its underscored class name.
Source: show
# File actionmailer/lib/action_mailer/preview.rb, line 135 def find(preview) all.find { |p| p.preview_name == preview } end