Moving notifier from lib to engine.
This commit is contained in:
parent
1c2ec5d2f8
commit
9b8ef40260
|
@ -0,0 +1,12 @@
|
||||||
|
class Notifier < ::ActionMailer::Base
|
||||||
|
|
||||||
|
def confirmation_instructions(record)
|
||||||
|
# TODO: configure email
|
||||||
|
end
|
||||||
|
|
||||||
|
def reset_password_instructions(record)
|
||||||
|
# TODO
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#Devise::Notifier.template_root = File.join(File.dirname(__FILE__), '..', 'views')
|
|
@ -20,8 +20,6 @@ require 'devise/models/confirmable'
|
||||||
require 'devise/models/recoverable'
|
require 'devise/models/recoverable'
|
||||||
require 'devise/models/validatable'
|
require 'devise/models/validatable'
|
||||||
|
|
||||||
require 'devise/mailers/notifier'
|
|
||||||
|
|
||||||
class ActionController::Base
|
class ActionController::Base
|
||||||
include Devise::Controllers::Authenticable
|
include Devise::Controllers::Authenticable
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
module Devise
|
|
||||||
class Notifier < ::ActionMailer::Base
|
|
||||||
|
|
||||||
def confirmation_instructions(record)
|
|
||||||
# TODO: configure email
|
|
||||||
end
|
|
||||||
|
|
||||||
def reset_password_instructions(record)
|
|
||||||
# TODO
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Devise::Notifier.template_root = File.join(File.dirname(__FILE__), '..', 'views')
|
|
|
@ -33,7 +33,7 @@ module Devise
|
||||||
# Send confirmation instructions by email
|
# Send confirmation instructions by email
|
||||||
#
|
#
|
||||||
def send_confirmation_instructions
|
def send_confirmation_instructions
|
||||||
::Devise::Notifier.deliver_confirmation_instructions(self)
|
::Notifier.deliver_confirmation_instructions(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
|
|
|
@ -25,7 +25,7 @@ module Devise
|
||||||
#
|
#
|
||||||
def send_reset_password_instructions
|
def send_reset_password_instructions
|
||||||
reset_perishable_token!
|
reset_perishable_token!
|
||||||
::Devise::Notifier.deliver_reset_password_instructions(self)
|
::Notifier.deliver_reset_password_instructions(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
module ClassMethods
|
module ClassMethods
|
||||||
|
|
Loading…
Reference in New Issue