I have two ActiveRecord models. Idea and User. There’s an association between the two that is working like User.idea.
The User model currently save lat and lng coordinates from the user.
From ideas controller, I would like to query all ideas that match a certain location. I’m not how can I do this inverse join query in Rails.
I guess you want this:
some_lat/some_lngcan be a Range. Rails will handle the magic.