lib/geocoder/lookups/geoip2.rb in geocoder-1.6.7 vs lib/geocoder/lookups/geoip2.rb in geocoder-1.7.0

- old
+ new

@@ -35,9 +35,13 @@ end def results(query) return [] unless configuration[:file] + if @mmdb.respond_to?(:local_ip_alias) && !configuration[:local_ip_alias].nil? + @mmdb.local_ip_alias = configuration[:local_ip_alias] + end + result = @mmdb.lookup(query.to_s) result.nil? ? [] : [result] end end end