I am using Ruby on Rails 3.1 and I would like to handle my Web application based on state location. That is, I would like to handle that by using different databases (one for each state) and subdomains like www.uk.mywebsite.com, www.be.mywebsite.com, etc.
How can I do that? What do you advice about?
Use a geoip service/database or if you target new devices HTML5 geolocation API.