The easiest way to declare gmaps4rails in your model is:
acts_as_gmappable
The following default config will be assumed:
:process_geocoding => true : the geocode will be performed each time the model through a validate method
:process_geocoding => true
:validation => true : if the position of the address provided isn't found by google, an error will be displayed
:validation => true
:lat => "latitude", :lng => "longitude" : latitude and longitude will be saved in the tables latitude and longitude
:lat => "latitude"
:lng => "longitude"
latitude
longitude
:check_process => true, :checker => "gmaps : the status of the geocode, will be saved in a boolean called gmaps
:check_process => true
:checker => "gmaps
gmaps
All or part of these default behaviours can be customized with the following arguments:
:lat : string
:lat
:lng : string
:lng
:process_geocoding : true/false
:process_geocoding
These are only used if process_geocoding is true:
process_geocoding
:check_process : true/false
:check_process
:checker : string (only if check_process is true)
:checker
:validation : true/false
:validation
:msg : string, to customize the error message in validation (if activated)
:msg
You could do the following:
acts_as_gmappable :process_geocoding => false
There was an error while loading. Please reload this page.