if Rails.env.development?
@current_location_geo = Geocoder.search(request.remote_ip).first
else
@current_location_geo = request.location
end
if [email protected]_location_geo.nil? && @current_location_geo.ip == "127.0.0.1"
@departure_currency_code= "AUD"
@departure_currency_name= ["Australian Dollar(AUD $)","AUD"]
else
@country = Country.new(request.location.data["country_code"].to_s)
@country_code = @country.currency.code
end
end
ich erhalte request.location null. Ich habe versucht, Timeout in der Konfiguration hinzuzufügen, aber es half mir nicht.Die Antwort der Geokodierungs-API war kein gültiger JSON. und request.location = null
Fehler in Produktionsmodus als "Geocoding-API-Antwort war nicht gültig JSON."
und als ich es verfolgt habe ich bekam request.location als Null.
meine Geocoder-Version ist (1.2.6).
Korrektur 'telize' sollte ein Symbol sein': telize' – jwilsco