I have a User model and a Task model. I have not mentioned any relation between them while creating them.
User
Task
I need to establish that U
U
The migration will add the user's id to the task table so they know about each other
rails g migration AddUserIdToTask user_id:integer
then
rake db:migrate
And after update your controllers and views so that tasks can't be created on their own but must correspond to a user