Closed Jeewes closed 12 years ago
Doc states: The columns in his db are, lat, lng, address, gmaps.
True, my bad. That solves the problem, but I still wonder that I can't find anywhere the reason I need the geocode? method. It appears only in that one DRY example which is not explained so verbosely.
I'd really appreciate any insight of the purpose of geocode? method. Is it compolsory to have?
process_geocoding
could be a boolean or a Proc/method returning a boolean.
The purpose is to know whether or not geocoding should be triggered.
All details are here: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Model-Customization
Thank you for your kind help.
Still a bit new to these things and I really appreciate the help.
I have "acts_as_gmappable" (gmaps4rails) and "acts_as_mappable" (Geokit) in my model definition. I have also defined gmaps4rails_address method.
Now I get undefined method 'geocode?'
DRY example in wiki suggests to define such method as follows:
def geocode? !(address.blank? || (!lat.blank? && !lng.blank?)) end
After that is says "undefined local variable or method 'address'".
Do I need address column in db or is lat and lng enough?
How can I fix this problem and why is geocode? method needed?