Make Devise::Mailer inherit from ApplicationMailer
This way we remove duplication in the `from:` proc, the helpers, and the methods we're about to write.
This commit is contained in:
@@ -14,11 +14,15 @@ Devise.setup do |config|
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
# note that it will be overwritten if you use your own mailer class
|
||||
# with default "from" parameter.
|
||||
config.mailer_sender = proc { "'#{Setting["mailer_from_name"]}' <#{Setting["mailer_from_address"]}>" }
|
||||
# We're not setting it here because it's set by the ApplicationMailer class
|
||||
# config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
|
||||
|
||||
# Configure the class responsible to send e-mails.
|
||||
config.mailer = "DeviseMailer"
|
||||
|
||||
# Configure the parent class responsible to send e-mails.
|
||||
config.parent_mailer = "ApplicationMailer"
|
||||
|
||||
# ==> ORM configuration
|
||||
# Load and configure the ORM. Supports :active_record (default) and
|
||||
# :mongoid (bson_ext recommended) by default. Other ORMs may be
|
||||
|
||||
Reference in New Issue
Block a user