I have rails application with a Venue model:
Venue
:name
:description
:address
:latitude
:longitude
I want to let users search for venues by name and also by proximity to a starting postcode. So a user may search for venues within 10 miles of a postcode and that does a partial match on the name.
Using the geocoder gem I'm able to search by proximity with Venue.near('name',range_in_miles) which solves my problem. But how could I use Picky and Geocoder together? Is there a recommended way?
In the near future a venue will have several sub categories - like 'non-smoking', 'countryside' etc and I would like to include these in the search. Plus there will be a Suppliers model which will list services nearby.
any pointers would be great
venues = Index::Memory.new :venues dosource { Venue.all }category :name, partial: Partial::Substring.new(from: 1)
geo_categories :latitude, :longitude, 1.61, precision: 3end