Search code examples
ruby-on-railsmigrationgmaps4rails

How to prevent gmaps4rails from geocoding during migrations


I'm using:

acts_as_gmappable :process_geocoding => true, :check_process => false

But when I was doing a migration, I had all kinds of weirdness happening because it was regeocoding everything, and I think google temporarily blocked me for flooding or something. Is there a way to set :process_geocoding to false temporarily? I couldn't find mention of it in the docs anywhere, just how to set it initially.


Solution

  • I don't know how you proceed your migrations.

    The idea to what you desire is to change the gmaps4rails_options instance method (source code here).

    Either use a class_eval or an instance_eval to change it on the fly.