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

Merge pull request #1045 from aaronpk/esri-fix

fix reference to EsriToken, avoid using rails .minutes
parents 8ff8f078 b887ba26
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ module Geocoder
Geocoder.log(:warn, response['error'])
else
token_value = response['access_token']
expires_at = Time.now + expires.minutes
expires_at = Time.now + (expires * 60)
new(token_value, expires_at)
end
end
......
......@@ -51,7 +51,7 @@ module Geocoder::Lookup
if configuration[:token] && configuration[:token].active? # if we have a token, use it
configuration[:token].to_s
elsif configuration.api_key # generate a new token if we have credentials
token_instance = EsriToken.generate_token(*configuration.api_key)
token_instance = Geocoder::EsriToken.generate_token(*configuration.api_key)
Geocoder.configure(:esri => {:token => token_instance})
token_instance.to_s
end
......
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