From e50a4e57c653a6a126a6c1a2546c1f0da1d1c798 Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Mon, 16 Sep 2019 09:09:22 +1000 Subject: [PATCH] Expand on helpers available in Action Mailer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- guides/source/action_mailer_basics.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/guides/source/action_mailer_basics.md b/guides/source/action_mailer_basics.md index 63a6733092..c48ec4d5ce 100644 --- a/guides/source/action_mailer_basics.md +++ b/guides/source/action_mailer_basics.md @@ -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 %> +

<%= message.subject %>

+``` Action Mailer Configuration ---------------------------