I'm trying to localize my users throught their IP address. As the docs say, a class method called geocode_ip_address
has been mixed into the ActionController::Base
. But there must be something I'm missing. Do I have to define a filter like this before_filter :geocode_ip_address
to use it? (I want to know the location for every request done).
The documentation also talks about "A first-time lookup will result in the GeoLoc class being stored in the session as :geo_location
" but I certainly don't have that key inside the session hash.
What am I doing wrong?
Thanks.