Skip to content
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

Some modifications to the devise login tracker gem #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

JohnSmall
Copy link

Hi. I've been using your gem and I've had to fix some issues that occur if you're using a model that isn't User, and possibly many Devised models in one app. In my case I have a User model and an Admin model so that I can have different authentication rules for different classes of user. It was always trying to use User, even if the login was from Admin.

One of the changes you probably won't want to include. I've change the migration so that it uses the Postgresql type inet for storing ip addresses, hence t.inet in the migration. This is special for my use, so I'm going to change the gem to be pg-devise-login-tracker so I can publish it on RubyGems and pull it into the projects I'm working on right now. I get problems with gems loaded directly from GitHub when I'm installing in the cloud.

Thanks for your work on this.

John Small

John-Mainsys and others added 7 commits November 16, 2014 18:27
…er_id, even if the model wasn't User. It now creates via the association, which is always 'logins', so we use logins.create & etc
…evise is workign with more than one model. This resulted in an error because warden.session[etc] would try to get the session hash for the default model, which might not be the one you want
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant