I'm sending plain text and html emails by having multiple files for each
email I send.  For example, for my registration email I have a
registration.text.plain.erb file and a registration.text.html.erb file.
I want to use a layout for the html version of my emails.  In my mailer
I put:

class AccountsMailer < ActionMailer::Base
  layout 'email'
  ...
end

Unfortunately rails seems to look for views/layouts/email.html.erb and
uses that layout for both my HTML and plain text emails.  When I name
the file email.text.html.erb rails complains:

Missing layout layouts/email.erb ...

How do I set up action mailer so that it uses a layout only for the html
version of emails?

Thanks
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to