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

Adding params for geocoded_by and reverse_geocoded_by

parent bd80d921
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,8 @@ module Geocoder ...@@ -18,7 +18,8 @@ module Geocoder
:units => options[:units], :units => options[:units],
:method => options[:method], :method => options[:method],
:lookup => options[:lookup], :lookup => options[:lookup],
:language => options[:language] :language => options[:language],
:params => options[:params]
) )
end end
...@@ -35,7 +36,8 @@ module Geocoder ...@@ -35,7 +36,8 @@ module Geocoder
:units => options[:units], :units => options[:units],
:method => options[:method], :method => options[:method],
:lookup => options[:lookup], :lookup => options[:lookup],
:language => options[:language] :language => options[:language],
:params => options[:params]
) )
end end
...@@ -47,4 +49,3 @@ module Geocoder ...@@ -47,4 +49,3 @@ module Geocoder
end end
end end
end end
...@@ -113,4 +113,3 @@ module Geocoder ...@@ -113,4 +113,3 @@ module Geocoder
end end
end end
end end
...@@ -34,4 +34,10 @@ class ModelTest < GeocoderTestCase ...@@ -34,4 +34,10 @@ class ModelTest < GeocoderTestCase
assert_equal :km, PlaceReverseGeocoded.geocoder_options[:units] assert_equal :km, PlaceReverseGeocoded.geocoder_options[:units]
assert_equal :spherical, PlaceReverseGeocoded.geocoder_options[:method] assert_equal :spherical, PlaceReverseGeocoded.geocoder_options[:method]
end end
def test_params
params = {incude: "cios2"}
PlaceReverseGeocoded.reverse_geocoded_by :latitude, :longitude, params: params
assert_equal params, PlaceReverseGeocoded.geocoder_options[:params]
end
end 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