mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Remove unused options param for token_auth schema, and avoid creating a new hash
This commit is contained in:
parent
6a09daf570
commit
98e69cfd71
3 changed files with 8 additions and 6 deletions
|
@ -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,7 +26,7 @@ module Devise
|
|||
end
|
||||
|
||||
# Creates authentication_token.
|
||||
def token_authenticatable(options={})
|
||||
def token_authenticatable
|
||||
apply_devise_schema :authentication_token, String
|
||||
end
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ module SharedAdmin
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
devise :database_authenticatable, :encryptable, :registerable, :timeoutable, :recoverable, :rememberable, :lockable, :unlock_strategy => :time
|
||||
devise :database_authenticatable, :encryptable, :registerable,
|
||||
:timeoutable, :recoverable, :rememberable, :lockable,
|
||||
:unlock_strategy => :time
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue