Changes to address aren't saved #208

danmaz74 opened this Issue May 13, 2012 · 2 comments

2 participants


When the address in the model is changed, the map location isn't updated automatically - this is known and I found a solution on stackexchange.

But I wonder if it wouldn't be possible to add to the gem itself a solution like this:


I wouldn't add extra complexity to the gem for this purpose.

Concerning your solution, I don't like the idea to duplicate data in the db. You'd rather do something like (untested):

attr_accessor :latest_address

after_initialize :set_latest_address

before_validation :check_g4r_address

def set_latest_address
   self.latest_address = self.gmaps4rails_address

def check_g4r_address
   self.gmaps = false if self.latest_address != self.gmaps4rails_address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment