apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

Can't describe how to retrieve the address from my model #19

Closed thiagofm closed 13 years ago

thiagofm commented 13 years ago

On gmaps4rails docs we have:

    def gmaps4rails_address
      self.address #describe how to retrieve the address from your model
    end

How do I set a custom composed address there? I've tried:

    def gmaps4rails_address
      self.address =  (address + ', ' + city + ', ' + state + ', ' + zip)
    end

And it didn't work, I have the city state zip and address field in my table.

Why doesn't it work?

apneadiving commented 13 years ago

Could you please ask your question on stsckoverflow? Thanks.

thiagofm commented 13 years ago

http://stackoverflow.com/questions/5765769/composed-address-in-gmaps4rails

Thank you, the plugin is awesome!

apneadiving commented 13 years ago

Just answered, glad my work helps ;)