I come across a small issue in my app. I'm currently using geokit to find objects near a given location, and I use the sort_by_distance_from on the found set.
See below:
@find = Item.find(:all, :origin =>[self.geocode.lat.to_f,self.geocode.lng.to_f], :within=>50, :include=>[:programs], :conditions=>["programs.name = ?", self.name])
@find.sort_by_distance_from([self.geocode.lat.to_f,self.geocode.lng.to_f]
Is there any way with geokit to paginate form the DB when sorting by distance?
AKA, not calling the full found set?