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
@@ -26,4 +26,4 @@ end
Mongoid::Document::ClassMethods.class_eval do
include Devise::Models
include Devise::Orm::Mongoid::Hook
end
end

View File

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