mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-18 06:17:49 -05:00
- active (default: true)
- location, latitude and longitude (because when you move house, you
don't take your garden with you)
- area and area units (square feet or metres)
18 lines
500 B
Ruby
18 lines
500 B
Ruby
require 'geocodable'
|
|
|
|
Geocoder.configure(
|
|
:units => :km,
|
|
:timeout => 10,
|
|
:http_headers => {
|
|
"User-Agent" =>
|
|
"#{Growstuff::Application.config.user_agent} #{Growstuff::Application.config.user_agent_email}",
|
|
"From" => Growstuff::Application.config.user_agent_email
|
|
}
|
|
)
|
|
# This configuration takes precedence over environment/test.rb
|
|
# Reported as https://github.com/alexreisner/geocoder/issues/509
|
|
if Geocoder.config.lookup != :test
|
|
Geocoder.configure(:lookup => :nominatim)
|
|
end
|
|
|