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

Merge pull request #37206 from sj26/patch-1

Expand on helpers available in Action Mailer
This commit is contained in:
Kasper Timm Hansen 2019-09-16 01:40:41 +02:00 committed by GitHub
commit 87ec20447e
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
---------------------------