Skip to content

Commit

Permalink
Changed all DateTime fields to Time
Browse files Browse the repository at this point in the history
  • Loading branch information
allspiritseve committed Nov 3, 2011
1 parent bfe4bea commit 96ee5e7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions lib/sorcery/model/submodules/activity_logging.rb
Expand Up @@ -39,12 +39,12 @@ def current_users
protected

def define_activity_logging_mongoid_fields
field sorcery_config.last_login_at_attribute_name, :type => DateTime
field sorcery_config.last_logout_at_attribute_name, :type => DateTime
field sorcery_config.last_activity_at_attribute_name, :type => DateTime
field sorcery_config.last_login_at_attribute_name, :type => Time
field sorcery_config.last_logout_at_attribute_name, :type => Time
field sorcery_config.last_activity_at_attribute_name, :type => Time
end
end
end
end
end
end
end
4 changes: 2 additions & 2 deletions lib/sorcery/model/submodules/brute_force_protection.rb
Expand Up @@ -38,12 +38,12 @@ module ClassMethods

def define_brute_force_protection_mongoid_fields
field sorcery_config.failed_logins_count_attribute_name, :type => Integer
field sorcery_config.lock_expires_at_attribute_name, :type => DateTime
field sorcery_config.lock_expires_at_attribute_name, :type => Time
end

def define_brute_force_protection_mongo_mapper_fields
key sorcery_config.failed_logins_count_attribute_name, Integer
key sorcery_config.lock_expires_at_attribute_name, DateTime
key sorcery_config.lock_expires_at_attribute_name, Time
end
end

Expand Down
5 changes: 2 additions & 3 deletions lib/sorcery/model/submodules/reset_password.rb
Expand Up @@ -72,13 +72,12 @@ def validate_mailer_defined

def define_reset_password_mongoid_fields
field sorcery_config.reset_password_token_attribute_name, :type => String
field sorcery_config.reset_password_token_expires_at_attribute_name, :type => DateTime
field sorcery_config.reset_password_email_sent_at_attribute_name, :type => DateTime
field sorcery_config.reset_password_token_expires_at_attribute_name, :type => Time
field sorcery_config.reset_password_email_sent_at_attribute_name, :type => Time
end

def define_reset_password_mongo_mapper_fields
key sorcery_config.reset_password_token_attribute_name, String
# no DateTime in MM
key sorcery_config.reset_password_token_expires_at_attribute_name, Time
key sorcery_config.reset_password_email_sent_at_attribute_name, Time
end
Expand Down
3 changes: 1 addition & 2 deletions lib/sorcery/model/submodules/user_activation.rb
Expand Up @@ -84,15 +84,14 @@ def define_user_activation_mongoid_fields
self.class_eval do
field sorcery_config.activation_state_attribute_name, :type => String
field sorcery_config.activation_token_attribute_name, :type => String
field sorcery_config.activation_token_expires_at_attribute_name, :type => DateTime
field sorcery_config.activation_token_expires_at_attribute_name, :type => Time
end
end

def define_user_activation_mongo_mapper_fields
self.class_eval do
key sorcery_config.activation_state_attribute_name, String
key sorcery_config.activation_token_attribute_name, String
# no DateTime in MM
key sorcery_config.activation_token_expires_at_attribute_name, Time
end
end
Expand Down

0 comments on commit 96ee5e7

Please sign in to comment.