mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Merge pull request #2223 from jayshepherd/master
Allow parent_mailer to be customizable via Devise.parent_mailer ... (#2219)
This commit is contained in:
commit
0642e2fc9b
2 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
class Devise::Mailer < ::ActionMailer::Base
|
||||
class Devise::Mailer < Devise.parent_mailer.constantize
|
||||
include Devise::Mailers::Helpers
|
||||
|
||||
def confirmation_instructions(record, opts={})
|
||||
|
|
|
@ -199,6 +199,12 @@ module Devise
|
|||
mattr_accessor :parent_controller
|
||||
@@parent_controller = "ApplicationController"
|
||||
|
||||
# The parent mailer all Devise mailers inherit from.
|
||||
# Defaults to ActionMailer::Base. This should be set early
|
||||
# in the initialization process and should be set to a string.
|
||||
mattr_accessor :parent_mailer
|
||||
@@parent_mailer = "ActionMailer::Base"
|
||||
|
||||
# The router Devise should use to generate routes. Defaults
|
||||
# to :main_app. Should be overriden by engines in order
|
||||
# to provide custom routes.
|
||||
|
|
Loading…
Reference in a new issue