Gmaps4rails - longitude and latitude in the database are not updated. <nested form>

I have a model place with attribute names, state, longitude and latitude. The travel_plan model has many places.

I use a nested gem for places in the form of a travel plan.

My problem is that longitude and latitude were not updated when updating the name and state.

In my place .rb

 belongs_to :travel_plan acts_as_gmappable def gmaps4rails_address "#{name},#{state}" end def gmaps4rails_infowindow "<h4>#{name}</h4>" end 
+4
source share
1 answer

The answer lies here .

These two options are especially important for your question:

: check_process: true / false (if set to false, geocoding will be performed each time it is saved / updated)

: checker: string (only if check_process is true), can be a method or column db boolean

+4
source

Source: https://habr.com/ru/post/1389017/


All Articles