I’m using the rails geocoder gem and have the following in my location model
geocoded_by :address
but my location has other attributes such as city, state, and country which affect the outputted address.
How do I make the geocoding occur through all 4 inputs? I have tried creating a full_address variable with all four attributes but I don’t know where that actually goes.
Thanks!
Rather than a variable, you can use a method that will collate those attributes into a single string, e.g.:
Then you can just change your geocoded_by line to: