1
0
Fork 0
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:
José Valim 2013-01-18 05:35:55 -08:00
commit 0642e2fc9b
2 changed files with 7 additions and 1 deletions

View file

@ -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={})

View file

@ -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.