Class: ZipCode
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ZipCode
- Defined in:
- lib/earth/locality/zip_code.rb
Instance Method Summary collapse
Instance Method Details
#set_latitude_and_longitude ⇒ Object
16 17 18 19 20 |
# File 'lib/earth/locality/zip_code.rb', line 16 def set_latitude_and_longitude return if latitude.present? and longitude.present? a = Geokit::Geocoders::YahooGeocoder.geocode name update_attributes! :latitude => a.lat, :longitude => a.lng end |