GeolocateIP v0.1.0

is a gem used to get your visitors' Geolocation through their IP address.

Usage

First install the gem

    gem "GeolocateIP"

Then in your users controller add a

    before_filter :get_location

which will generate a @location array that contains your user's location information like so:

    @location["city"]

The available data is:

When you're in development mode, you're going to get Santa Barbara, CA, USA by default.

Some love

This gem was made possible by freegeoip.net.

Contributing to GeolocateIP

Copyright © 2011 Gal Koren. See LICENSE.txt for further details.