Moving notifier from lib to engine.

This commit is contained in:
Carlos A. da Silva 2009-10-07 22:08:24 -03:00
parent 1c2ec5d2f8
commit 9b8ef40260
7 changed files with 14 additions and 18 deletions

12
app/models/notifier.rb Normal file
View File

@ -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')

View File

@ -20,8 +20,6 @@ require 'devise/models/confirmable'
require 'devise/models/recoverable'
require 'devise/models/validatable'
require 'devise/mailers/notifier'
class ActionController::Base
include Devise::Controllers::Authenticable
end

View File

@ -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')

View File

@ -33,7 +33,7 @@ module Devise
# Send confirmation instructions by email
#
def send_confirmation_instructions
::Devise::Notifier.deliver_confirmation_instructions(self)
::Notifier.deliver_confirmation_instructions(self)
end
module ClassMethods

View File

@ -25,7 +25,7 @@ module Devise
#
def send_reset_password_instructions
reset_perishable_token!
::Devise::Notifier.deliver_reset_password_instructions(self)
::Notifier.deliver_reset_password_instructions(self)
end
module ClassMethods