tandrei
2009-Apr-22 20:32 UTC
Complex relationships in Ruby - display data across many tables
Hi, I have designed an application consisting of 20+ tables, and utilizing Ruby on Rails. I am using an authentication system for users to login. I want to display to the user, when he logs in, information related to him that can be found across many tables, between these tables there are all the possible relationships. How can I accomplish this in RoR? Should I consider using views, multiple joins? I did not managed to get information from one model further than 2 tables looking in the tables design using classical approaches like "has many", ":through" etc. Can you please share your knowledge? Thanks!