In my User model I could have:
and in my Task model:
Then, supposing the foreign key 'user_id' was stored in the tasks table, I could use:
My question is, how do I declare the has_many relationship such that I can refer to a User's Tasks as:
… or …
Thanks a heap.