Add Address class

This commit is contained in:
Erik Michaels-Ober 2011-02-23 16:09:48 -05:00
parent 1b07d05c8e
commit c14f186c53
3 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,7 @@
source 'http://rubygems.org'
gem 'rails', '3.0.4'
gem 'geokit'
group :development do
gem 'pg'

View File

@ -32,6 +32,7 @@ GEM
builder (2.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
geokit (1.5.0)
i18n (0.5.0)
mail (2.2.15)
activesupport (>= 2.3.6)
@ -70,6 +71,7 @@ PLATFORMS
ruby
DEPENDENCIES
geokit
pg
rails (= 3.0.4)
sqlite3

7
app/models/address.rb Normal file
View File

@ -0,0 +1,7 @@
class Address
include Geokit::Geocoders
def self.find_lat_lng(address)
MultiGeocoder.geocode(address).ll.split(',').map{|s| s.to_f}
end
end