Explanation of resource naming conventions, path structures, etc.
Use plural nouns (e.g., /contacts, /team-members).
/contacts
/team-members
Use hyphens to separate words in URLs (e.g., /quality-goals).
/quality-goals
Nest related resources when appropriate (/authors/1/books/2)
/authors/1/books/2
Most resources will be a "top-level" resource (not nested)
We use nesting in the backend (via routes.rb file) for relationships (many-to-many, one-to-many, etc.) (see BACKEND style guide)
routes.rb
UPDATE (10/2/23): We may be moving away from nesting for these relationships per Jase's new suggestion
Last updated 2 years ago