Fixed front page on mobile and improved city lookup
This commit is contained in:
@@ -1,21 +1,24 @@
|
||||
# config/initializers/geocoder.rb
|
||||
Geocoder.configure(
|
||||
config = {
|
||||
# geocoding service (see below for supported options):
|
||||
:lookup => :google,
|
||||
lookup: :google,
|
||||
|
||||
# IP address geocoding service (see below for supported options):
|
||||
:ip_lookup => :freegeoip,
|
||||
ip_lookup: :freegeoip,
|
||||
|
||||
# to use an API key:
|
||||
# :api_key => "AIzaSyDitM1lyVWkrumteDvSkje6GiIKYyHlAXM",
|
||||
|
||||
# geocoding service request timeout, in seconds (default 3):
|
||||
:timeout => 5,
|
||||
timeout: 5,
|
||||
|
||||
# set default units to kilometers:
|
||||
:units => :km,
|
||||
units: :km
|
||||
}
|
||||
|
||||
# caching (see below for details):
|
||||
#:cache => Redis.new,
|
||||
#:cache_prefix => "..."
|
||||
)
|
||||
# use our api key on the server
|
||||
if Rails.env.preview? || Rails.env.production?
|
||||
config[:api_key] = "AIzaSyDurfjX9f_NgYsJLyUuGqwdKuI745CE_OE"
|
||||
config[:use_https] = true
|
||||
end
|
||||
|
||||
Geocoder.configure(config)
|
||||
|
||||
Reference in New Issue
Block a user