Skip to content

Commit 1987875

Browse files
exocodeMaicolBen
authored andcommitted
detect Mongoid (till Mongoid will implement it) (#1348)
1 parent d886f47 commit 1987875

File tree

1 file changed

+1
-1
lines changed
  • app/models/devise_token_auth/concerns

1 file changed

+1
-1
lines changed

app/models/devise_token_auth/concerns/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def destroy_expired_tokens
214214
end
215215

216216
def should_remove_tokens_after_password_reset?
217-
if Rails::VERSION::MAJOR <= 5
217+
if Rails::VERSION::MAJOR <= 5 || defined?(Mongoid)
218218
encrypted_password_changed? &&
219219
DeviseTokenAuth.remove_tokens_after_password_reset
220220
else

0 commit comments

Comments
 (0)