1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Expand on helpers available in Action Mailer

Remove 'now just' — document the current state in an accessible way. Make it clear the set of helpers isn't **exactly** the same

Add references to `mailer` and `message` helpers which can be very useful.

`attachments` is already covered in "Making Inline Attachments"

Finding the mail-specific formatting heleprs are
This commit is contained in:
Samuel Cochran 2019-09-16 09:09:22 +10:00 committed by GitHub
parent 306e7a796d
commit e50a4e57c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -733,8 +733,17 @@ end
Using Action Mailer Helpers
---------------------------
Action Mailer now just inherits from `AbstractController`, so you have access to
the same generic helpers as you do in Action Controller.
Action Mailer inherits from `AbstractController`, so you have access to most
of the same helpers as you do in Action Controller.
There are also some Action Mailer-specific helper methods available in
`ActionMailer::MailHelper`. For example, these allow accessing the mailer
instance from your view with `mailer`, and accessing the message as `message`:
```erb
<%= stylesheet_link_tag mailer.name.underscore %>
<h1><%= message.subject %></h1>
```
Action Mailer Configuration
---------------------------