-
Notifications
You must be signed in to change notification settings - Fork 2
Application architecture overview
This redesign currently organizes the site into three main sections.
- Air: tools that DJs use during their shifts.
- Staff: tools that staff can use for other general tasks, like signing up for contests.
- Admin: tools that various administrators can use to manage content behind-the-scenes.
Within each section, there's a navigation sidebar on the left with subsections, and there's a dashboard that gives descriptions of each tool.
Since views
and controllers
tend to correspond with each other, we have subdirectories called air
, staff
, and admin
in those folders.
For controllers, you must add the appropriate namespace, e.g. class Admin::ContestsController < Admin::BaseController
. This also extends a base class that includes the right base layout which has the sidebar. For example, here's the base admin layout. Add on to these when a new section is ready.
When you're generating links, you usually need to add the namespace, e.g. admin_psas_path
, new_admin_psa_path
, etc. These tend to sound like weird names, but no worries.
When you're making views for a subsection, you'll usually have a file for each main action (edit
, index
, new
, show
), a reusable partial for the form (_form
), and a partial for any tab-based navigation (_navigation
).
The PSA book is the best quick example, and it has on-air and admin sides.