Forum: Ruby on Rails Using Layouts with ActionMailer when sending html formatted

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B893f527fda3493f1dc1e6dd8311a266?d=identicon&s=25 b.hutchison (Guest)
on 2005-11-12 12:49
(Received via mailing list)
Hello all, I've been spinning my wheels on a problem here, hope someone
can
help me out. I'm pretty new to Ruby & Rails. I've added some email
capabilities to Typo. Its all finally working for the most part, however
I
don't know how to get the layout specified. I am calling the Mailer
class
method to send the email from within the articles controller (for those
familiar with typo). I know about setting the layout in the Render
command
from reading the Rails book, but where would I do so here? I fire off
the
Mailer::deliver_email_updates() command and it 'renders' the email based
upon the email_updates method in my Mailer Class (Mailer <
ActionMailer::Base).

I've even tried setting the layout in the hash that I send to the body,
and
tried various naming conventions to see if it will get automatically
picked
up, to now avail.

Right now, my email template & partial tempates are scattered with
<font>
commends, where are ugly and I'd like to move them up into the <head> of
a
layout. Thanks in advance for any assistance.

Thanks,

Brian Hutchison
This topic is locked and can not be replied to.