I am working on a todo list app.so basically i have created the tables,one is
 subtasks,Project and the join table is assigns.

```
class Project < ActiveRecord::Base
validates :name,presence: :true
validates :description,presence: :true
has_many :subtasks,through: :assigns

end
class Subtask < ActiveRecord::Base
has_many :projects,through: :assigns

end
class Assign < ActiveRecord::Base
belongs_to :project
belongs_to :subtask
end

```

with this application i basically want to first create a project.then that project will  

 create three tasks namely devlopement,production,testing and with these tasks their wil
 be subtasks,which are the most important ones.so if for a task like devlopement,il have  

 todo of "working on jquery error","working on php",such todo's associated with tasks.

```
So,finally now my question is are my associations correct.coz my project should 
definitely have has_many with subtasks,but i think that every subtask belongs
to individual projects and diff projects will have diff subtasks.  

Please suggest me any changes if i am goin wrong sumwhere or if my associations 
are incorrect.

i have added the associations now,pls hav a look at it

And this is how the database looks
projects
id    name     description     created_at      updated_at

subtasks
id    name     description     created_at      updated_at

assigns
id    project_id    task_id  taskname created_at   updated_at

```