I'm teaching myself Rails, and as a test project I'm mocking up a simple question/answer app similar to stackoverflow.
In my simplified version I have:
- questions
- answers
- users (the authors of questions and answers)
- What's the proper relationship between users and questions?
- What's the proper relationship between users and answers?
It would seem to me that questions and answers don't really "belong_to" users, and instead questions and answers "has_one user" (the author). But that doesn't seem right either, because then the user would "belong_to question" and "belong_to answer".
Is HABTM the answer between the three classes?
Lots of people get stuck on this relationship thing, don't they? :)