mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-10 08:08:00 -05:00
removed global namespaces
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user