Arthur--
Hi Carlos,
How can I change the way devise saves the user current_ip?
I am using cloudflare and request.remote_ip holds one of cloudflares
CDN and not the real user IP, which is in anohter header var
"HTTP_CF_CONNECTING_IP".
thanks in advance,
On Friday, December 7, 2012 11:09:47 AM UTC, Carlos Antonio da Silva
wrote:
Sure, there is a way. But it's not provided by devise itself, but
by warden, the internal lib devise uses. See for instance our
trackable module:
https://github.com/plataformatec/devise/blob/master/lib/devise/hooks/trackable.rb
<https://github.com/plataformatec/devise/blob/master/lib/devise/hooks/trackable.rb>
Check out this wiki page on warden to see more about these
hooks/callbacks: https://github.com/hassox/warden/wiki/Callbacks
<https://github.com/hassox/warden/wiki/Callbacks>
If you want to add a full module, say with a model module to be
included, routes and so on, you'll have to rely on
Devise.add_module:
https://github.com/plataformatec/devise/blob/master/lib/devise.rb#L302
Check the docs and other modules to see examples on how to use it.
On Thu, Dec 6, 2012 at 10:07 PM, Arthur Chui
<arthu...@reverbhq.com <javascript:>> wrote:
to
--
At.
Carlos Antonio
--
---
You received this message because you are subscribed to the Google
Groups "Devise" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to plataformatec-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Bruno Machado
--
---
You received this message because you are subscribed to a topic in the Google Groups "Devise" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/plataformatec-devise/aCuFLef16Sk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to plataformatec-de...@googlegroups.com.
Bruno Machado