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

Use remote_ip instead of ip #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikwat
Copy link
Contributor

@mikwat mikwat commented Jul 23, 2019

Use remote_ip method provided by Rails instead of ip method provided
by Rack. This is consistent with how other devise modules work. For
example:
https://github.com/plataformatec/devise/blob/715192a7709a4c02127afb067e66230061b82cf2/lib/devise/models/trackable.rb#L46

I couldn't easily add a test for this since there are no existing integration tests. I'll try to do that in another pass. However, I tested this in my local Rails app and it worked as expected.

@madkins @mmzoo

Use `remote_ip` method provided by Rails intead of `ip` method provided
by Rack. This is consistent with how other devise modules work. For
example:

https://github.com/plataformatec/devise/blob/715192a7709a4c02127afb067e66230061b82cf2/lib/devise/models/trackable.rb#L46
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