1
0
Fork 0
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:
Carlos Antonio da Silva 2010-09-26 14:08:25 -03:00
parent 6a09daf570
commit 98e69cfd71
3 changed files with 8 additions and 6 deletions

View file

@ -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

View file

@ -26,7 +26,7 @@ module Devise
end
# Creates authentication_token.
def token_authenticatable(options={})
def token_authenticatable
apply_devise_schema :authentication_token, String
end

View file

@ -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