[Fix #2068] Use mail templates from application rather than devise
`default template_path:` was the documented way, but wasn’t working (and there was no hint in the source code of Devise that it could work) Therefore, let’s override `template_paths` instead and stop worrying
This commit is contained in:
parent
41dbd9d599
commit
bae7a2dd3c
1 changed files with 4 additions and 1 deletions
|
@ -1,6 +1,9 @@
|
|||
class DeviseUserMailer < Devise::Mailer
|
||||
helper :application # gives access to all helpers defined within `application_helper`.
|
||||
include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url`
|
||||
default template_path: 'devise_mailer' # to make sure that your mailer uses the devise views
|
||||
layout 'mailers/layout'
|
||||
|
||||
def template_paths
|
||||
['devise_mailer']
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue