Database Relationship Types
Last updated
Last updated
One-to-One: A user has one profile (e.g., /users/1/profile
).
One-to-Many: An author has many books (/authors/1/books
).
Many-to-Many: Projects and team members (/projects/1/team-members
).
UPDATE (10/2/23): We may be moving away from nesting for these relationships per Jase's new suggestion
(i.e. routes.rb
)
(e.g. projects_controller.rb
)