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

Restructuring directories for models and mailers.

This commit is contained in:
Carlos A. da Silva 2009-09-20 10:35:26 -03:00
parent 8e0c38b47a
commit 3655fe9096
15 changed files with 11 additions and 17 deletions

View file

@ -1,8 +1,7 @@
require 'devise/authenticable'
require 'devise/perishable_token'
require 'devise/confirmable'
require 'devise/recoverable'
require 'devise/validatable'
require 'devise/notifier'
require 'devise/models/authenticable'
require 'devise/models/perishable'
require 'devise/models/confirmable'
require 'devise/models/recoverable'
require 'devise/models/validatable'
require 'devise/mailers/notifier'

View file

@ -12,4 +12,3 @@ module Devise
end
Devise::Notifier.template_root = File.join(File.dirname(__FILE__), '..', 'views')

View file

@ -4,7 +4,7 @@ module Devise
def self.included(base)
base.class_eval do
extend ClassMethods
include ::Devise::PerishableToken
include ::Devise::Perishable
after_create :send_confirmation_instructions
end
@ -62,4 +62,3 @@ module Devise
end
end
end

View file

@ -1,5 +1,5 @@
module Devise
module PerishableToken
module Perishable
def self.included(base)
base.class_eval do
@ -22,4 +22,3 @@ module Devise
end
end
end

View file

@ -4,7 +4,7 @@ module Devise
def self.included(base)
base.class_eval do
extend ClassMethods
include ::Devise::PerishableToken
include ::Devise::Perishable
end
end
@ -61,4 +61,3 @@ module Devise
end
end
end

View file

@ -1,9 +1,9 @@
require 'test_helper'
class PerishableTokenTest < ActiveSupport::TestCase
class PerishableTest < ActiveSupport::TestCase
def setup
User.send :include, ::Devise::PerishableToken unless User.included_modules.include?(::Devise::PerishableToken)
User.send :include, ::Devise::Perishable unless User.included_modules.include?(::Devise::Perishable)
end
test 'should not have perishable token accessible' do
@ -62,4 +62,3 @@ class PerishableTokenTest < ActiveSupport::TestCase
assert_equal expected_token, user.perishable_token
end
end