Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure devise to use a custom email layout?

When I say layout I don't mean just simply the views, I generate those. On all my own mailers I'm using a default layout. Which I define in the SomeMailer.rb file

#some_mailer.rb class SomeMailer < ActionMailer::Base   layout 'sometemplate' 

Is there some way I can do this for the Devise Mailer et al.?

like image 582
holden Avatar asked Feb 15 '11 19:02

holden


1 Answers

Found the answer sitting in the Devise Github wiki,

Reading that helps. ;-)

config.to_prepare do   Devise::Mailer.layout "simple" # simple.haml or simple.erb   Devise::Mailer.helper :mailer end 

Here is the reference of the wiki page: How To: Create custom layouts

like image 105
holden Avatar answered Sep 22 '22 06:09

holden