search for: geocode_address

Displaying 2 results from an estimated 2 matches for "geocode_address".

2009 Feb 23
2
geokit - using :through to connect models
.... for some reason, i am running into a problem: ArgumentError: Unknown key(s): as i have two models, one that is geocoded, and one that belongs to that model. the models look like: ,----[ employer.rb ] | class Employer < ActiveRecord::Base | acts_as_mappable | before_validation_on_create :geocode_address | | has_many :internships | belongs_to :account | belongs_to :role | | private | def geocode_address | geo=GeoKit::Geocoders::MultiGeocoder.geocode(address1 + " " + city + " " + state + " " + zip) | errors.add(:address, "Could not Geocode addres...
2007 Dec 01
0
mock feed
...oders, I''m having difficulty getting a couple of tests to pass. I have an address model which takes an address and with a callback on save and update passes the address to google''s geocoding service. The returned XML is parsed and saved to the address object: protected def geocode_address key = "mykey" url = "http://maps.google.com/maps/geo?q=#{self.address_1.gsub('' '', ''+'')},+#{self.postcode},+FRANCE&output=xml&key=#{key}" doc = Hpricot.XML(Iconv.iconv("UTF-8", "ISO-8859-2", open(URI.esca...