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

Simplify code (nil params will be ignored).

parent 145613f6
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,9 @@ module Geocoder::Lookup
params = {
:geoit => "xml",
:jsonp => 1,
:callback => "test"
:callback => "test",
:auth => Geocoder::Configuration.api_key
}
params.update({:auth => Geocoder::Configuration.api_key}) if Geocoder::Configuration.api_key.present?
if reverse
lat,lon = query.split(',')
params[:latt] = lat
......
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