mirror of
https://github.com/heartcombo/devise.git
synced 2026-04-28 03:00:29 -04:00
Remove unused options param for token_auth schema, and avoid creating a new hash
This commit is contained in:
@@ -16,7 +16,7 @@ module Devise
|
||||
# Tell how to apply schema methods
|
||||
def apply_devise_schema(name, type, options={})
|
||||
type = Time if type == DateTime
|
||||
field name, { :type => type }.merge(options)
|
||||
field name, { :type => type }.merge!(options)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -26,4 +26,4 @@ end
|
||||
Mongoid::Document::ClassMethods.class_eval do
|
||||
include Devise::Models
|
||||
include Devise::Orm::Mongoid::Hook
|
||||
end
|
||||
end
|
||||
|
||||
@@ -18,7 +18,7 @@ module Devise
|
||||
|
||||
apply_devise_schema :email, String, :null => null, :default => default
|
||||
apply_devise_schema :encrypted_password, String, :null => null, :default => default, :limit => 128
|
||||
end
|
||||
end
|
||||
|
||||
# Creates password salt for encryption support.
|
||||
def encryptable
|
||||
@@ -26,7 +26,7 @@ module Devise
|
||||
end
|
||||
|
||||
# Creates authentication_token.
|
||||
def token_authenticatable(options={})
|
||||
def token_authenticatable
|
||||
apply_devise_schema :authentication_token, String
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user