diff --git a/lib/sorcery/model/submodules/activity_logging.rb b/lib/sorcery/model/submodules/activity_logging.rb index 0ce6cfbd..552c9b6f 100644 --- a/lib/sorcery/model/submodules/activity_logging.rb +++ b/lib/sorcery/model/submodules/activity_logging.rb @@ -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 \ No newline at end of file +end diff --git a/lib/sorcery/model/submodules/brute_force_protection.rb b/lib/sorcery/model/submodules/brute_force_protection.rb index 59dd86f6..78229d1d 100644 --- a/lib/sorcery/model/submodules/brute_force_protection.rb +++ b/lib/sorcery/model/submodules/brute_force_protection.rb @@ -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 diff --git a/lib/sorcery/model/submodules/reset_password.rb b/lib/sorcery/model/submodules/reset_password.rb index a06afc68..1cb292b6 100644 --- a/lib/sorcery/model/submodules/reset_password.rb +++ b/lib/sorcery/model/submodules/reset_password.rb @@ -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 diff --git a/lib/sorcery/model/submodules/user_activation.rb b/lib/sorcery/model/submodules/user_activation.rb index 734529a2..c5dae600 100644 --- a/lib/sorcery/model/submodules/user_activation.rb +++ b/lib/sorcery/model/submodules/user_activation.rb @@ -84,7 +84,7 @@ 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 @@ -92,7 +92,6 @@ 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