Active record question

Thanks Phlip -

Thanks for the response - I’ll play around with your suggestions.

What I was trying to do was something like this project.appointments to display all the appointments for a specific project.

The way I have it set up is that a project has many tasks, each task can have many resources (people) and each resource then has appointments. I’m not sure this is the best way to model but I thought it would be easier just keeping one reference to the project_id in the tasks table rather then trying to manage all the links back up to the projects table from the resources and appointments tables. Maybe a bad design decision??

Mark Studebaker wrote:

What I was trying to do was something like this project.appointments to display all the appointments for a specific project.

Briefly, since you seem to have more experience with raw SQL than ActiveRecord (better than the other way around!;), try inspect_sql to see what you are getting as you tune this.

But I should let someone else take a crack at the data model question now.