Created
January 22, 2013 21:35
-
-
Save davetapley/4598660 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.within_distance_from(*args) | |
return Place.within_distance_from_place args[0], args[1] if args.length == 2 | |
return Place.within_distance_from_point args[0], args[1], args[2] if args.length == 3 | |
raise ArgumentError, 'Call with either a Place or latitude, longitude; and distance' | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment