The first to thing to have: a model that contains a has_many relation with another model.
class Project < ApplicationRecord
has_many :todos
end
class Todo < ApplicationRecord
belongs_to :project
end
In ProjectsController:
class ProjectsController < ApplicationController
d...