removed global namespaces

This commit is contained in:
Andrey Deryabin
2012-04-16 21:27:16 +07:00
parent 64c99bcfd4
commit 9ec1003f1e
3 changed files with 3 additions and 3 deletions

View File

@@ -67,7 +67,7 @@ module Devise
when nil
raise "You need to give an :encryptor as option in order to use :encryptable"
else
::Devise::Encryptors.const_get(encryptor.to_s.classify)
Devise::Encryptors.const_get(encryptor.to_s.classify)
end
end

View File

@@ -70,7 +70,7 @@ module Devise
generate_token(:authentication_token)
end
::Devise::Models.config(self, :token_authentication_key, :expire_auth_token_on_timeout)
Devise::Models.config(self, :token_authentication_key, :expire_auth_token_on_timeout)
end
end
end

View File

@@ -54,7 +54,7 @@ class EncryptableTest < ActiveSupport::TestCase
test 'should respect encryptor configuration' do
swap_with_encryptor Admin, :sha512 do
admin = create_admin
assert_equal admin.encrypted_password, encrypt_password(admin, Admin.pepper, Admin.stretches, ::Devise::Encryptors::Sha512)
assert_equal admin.encrypted_password, encrypt_password(admin, Admin.pepper, Admin.stretches, Devise::Encryptors::Sha512)
end
end