-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow customizing locked_at field (clash with Devise). #26
Comments
I'd like a PR that lets you customize the field. I'll rename the title of this issue to that. |
Yeesh, that's unfortunate about the Devise clash. 👍 for making the name configurable, and/or changing the default to something like |
There's the PR with renaming (for now). I'll take another stab on configurability later this week. |
Resolved in #55. Please try HEAD! |
Awesome news! I felt kinda bad about not following up on this :) |
mongoid-locker uses hardcoded field name
:locked_at
. This is also the name that is hardcoded intoDevise::Lockable
module.In our app that led to a nasty bug where users would be spontaneously logged out. Very annoying.
I tried to make the field configurable but I hated the result (code becomes quite uglier). So I won't be posting a PR now, I'm afraid.
In our app I fixed it by forking and hardcode-renaming the field: https://github.com/stulentsev/mongoid-locker/tree/alternate_field
A clash with such popular gem as Devise should be a serious problem. I'm actually surprised it didn't surface earlier.
The text was updated successfully, but these errors were encountered: