Skip to content
Snippets Groups Projects
Commit 8ada7b61 authored by Thu Trang Pham's avatar Thu Trang Pham
Browse files

Refactor results/ipinfo_io.rb

parent 60bbeea1
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ module Geocoder::Result
end
def coordinates
[@data['loc'].split(',')[0].to_f, @data['loc'].split(',')[1].to_f]
[latitude, longitude]
end
def city
......@@ -44,7 +44,7 @@ module Geocoder::Result
end
def self.response_attributes
%w['ip', 'city', 'region', 'country', 'latitude', 'longitude', 'postal_code']
%w['ip', 'region', 'postal']
end
response_attributes.each do |a|
......
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