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

Return nil instead of [] when object not geocoded.

For discussion see:
https://github.com/alexreisner/geocoder/issues/329
parent 879a6739
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ module Geocoder
# Takes the same options hash as the near class method (scope).
#
def nearbys(radius = 20, options = {})
return [] unless geocoded?
return nil unless geocoded?
options.merge!(:exclude => self)
self.class.near(self, radius, options)
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