dawarich/config/initializers/geocoder.rb

24 lines
500 B
Ruby
Raw Normal View History

2024-07-12 15:59:03 -04:00
# frozen_string_literal: true
2024-08-05 15:23:08 -04:00
config = {
# geocoding service request timeout, in seconds (default 3):
2024-08-12 16:18:11 -04:00
timeout: 10,
# set default units to kilometers:
units: :km,
# caching (see Caching section below for details):
cache: Redis.new,
cache_options: {
2024-07-12 15:59:03 -04:00
expiration: 1.day # Defaults to `nil`
# prefix: "another_key:" # Defaults to `geocoder:`
2024-08-12 16:18:11 -04:00
},
always_raise: :all,
2024-08-05 15:23:08 -04:00
use_https: false,
lookup: :photon,
photon: { host: 'photon.chibi.rodeo' }
}
2024-08-05 15:23:08 -04:00
Geocoder.configure(config)