GitHub User: rajkiran
Hi.. I am working with geocoder.
In my model, i am having fields like location, city, state, country and Pin code/ Zip code..
With the help of Geocoder i could be able to locate the complete address including street, city, state and country.
But my requirement is i need to locate the place with the help of Zip code too...
Here is my model:
class Employee < ActiveRecord::Base
attr_accessible :name, :location, :city, :state, :country, :pincode, :latitude, :longitude
[location, city, state, country].compact.join(', ')
after_validation :geocode, :if => :location_changed?
Can anyone help me out????????????