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
Post a Comment