I'm trying to get nearby users from a given location. I have users latitude and longitude(I'm taking out from their address).
Now when I'm searching a term like 'NC' its showing some of its results, But when I'm searching with the country name 'Unites States', it must show all the results but instead it doesn't show any result.
I'm using Geocoder gem for this. Here's what I'm doing:
controller :
@user = User.near(params[:search], 20, :order => :distance)
Model:
geocoded_by :address1
View :
Displaying all the results returned from @user
Any Idea what I should do so that it will return all results even if I search with a country name.