rails & custom devise controller > email templates

44 views
Skip to first unread message

tom

unread,
Nov 15, 2018, 9:03:37 AM11/15/18
to rubyonra...@googlegroups.com
hello,

i have an app that operates under 2 domains, depending on the domain
the app serves 2 different application layouts. Now i want to show
different devise-email-layouts when sending these devise emails.
I have the custom devise controllers and i can trigger them from an
test action, but i don't know how to use them on devise actions.
thank you in advance
t

Walter Lee Davis

unread,
Nov 15, 2018, 9:16:58 AM11/15/18
to rubyonra...@googlegroups.com
I would start here: https://guides.rubyonrails.org/layouts_and_rendering.html#the-layout-option

It's not specific to mailers, but the concept should apply.

Walter

> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CADQqhMcC8FrOtz_5_tR66%2Bi6wef8a69J2_SsNvsnCcttAgD%3DDg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Rob Zolkos

unread,
Nov 26, 2018, 4:07:05 PM11/26/18
to rubyonra...@googlegroups.com
You can also configure which email layout to use (would be similar to how you are setting the application layout to use).

  # Or to configure mailer layout
  Devise::Mailer.layout "email"

Reply all
Reply to author
Forward
0 new messages