1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

do not define mailer if ActionMailer is not defined

closes #2659
This commit is contained in:
Vasiliy Ermolovich 2013-10-03 17:38:26 +03:00
parent eaad61b2da
commit 036715facc

View file

@ -1,18 +1,20 @@
class Devise::Mailer < Devise.parent_mailer.constantize if defined?(ActionMailer)
include Devise::Mailers::Helpers class Devise::Mailer < Devise.parent_mailer.constantize
include Devise::Mailers::Helpers
def confirmation_instructions(record, token, opts={}) def confirmation_instructions(record, token, opts={})
@token = token @token = token
devise_mail(record, :confirmation_instructions, opts) devise_mail(record, :confirmation_instructions, opts)
end end
def reset_password_instructions(record, token, opts={}) def reset_password_instructions(record, token, opts={})
@token = token @token = token
devise_mail(record, :reset_password_instructions, opts) devise_mail(record, :reset_password_instructions, opts)
end end
def unlock_instructions(record, token, opts={}) def unlock_instructions(record, token, opts={})
@token = token @token = token
devise_mail(record, :unlock_instructions, opts) devise_mail(record, :unlock_instructions, opts)
end
end end
end end