Accessing members of collection during rails activerecord query with geocoder -


i'm using geocoder gem. model user has latitude, longitude, , radius attributes. have collection of users called liveusers in instance method in class user. want trim liveusers down users less radius away instance's location, using .near method geocoder. how construct kind of query?

liveusers.near([self.latitude, self.longitude], liveuser.radius )  # realise won't work 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -