Skip to content
Snippets Groups Projects
Commit 8fa9b3ea authored by Alex Reisner's avatar Alex Reisner
Browse files

Add multi-address example.

parent 3c7e606f
No related branches found
No related tags found
No related merge requests found
......@@ -206,6 +206,11 @@ You are not stuck with using the `latitude` and `longitude` database column name
geocoded_by :address, :latitude => :lat, :longitude => :lon # ActiveRecord
geocoded_by :address, :coordinates => :coords # MongoDB
This means you can geocode multiple addresses as well:
geocoded_by :start_address, latitude: :start_latitude, longitude: :start_longitude
geocoded_by :end_address, latitude: :end_latitude, longitude: :end_longitude
The `address` method can return any string you'd use to search Google Maps. For example, any of the following are acceptable:
* "714 Green St, Big Town, MO"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment