I have 3 models, for example:
location, user, discovered_location(location_id,user_id)
It seems to me that I need an external connection to get all the locations, and also include the detected model if this location was discovered by the user.
I need something like {location1, location2, location3:includes discovered_location, location4 ..}
Is there a way for Rails 3 to do this? If not, what is the best way?
EDIT
I want to get the above locations for a specific user. To better illustrate, this should be:
user {location1, location2, location3:includes discovered_location, location4 ..}
(The user has many discovered places)
source share