You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
School Show — Tabbed Nested Resources (Turbo Frames)
Requirements
School show page is the only show page in the admin interface; it exists solely to host tabs for Students, Classrooms, Teachers.
Each tab renders the corresponding nested resource's existing index action inside a Turbo Frame — no separate tab-specific views/partials.
Each nested resource's index Turbo Frame id is generated via the dom_id helper (e.g. dom_id(@school, :teachers)), not a hardcoded string.
Nested index views assume they always render inside the frame on the school show page; no requirement to support standalone/bare rendering.
Tabs load lazily (loading: :lazy) so only the active tab's data is fetched.
Edit/new actions for nested resources are full page navigations (not rendered inside the frame).
On successful create/update/destroy, redirect to the school show page with the acted-on tab active via query param (e.g. school_path(@school, tab: "teachers")).
School show page reads the tab param to determine which tab is active/expanded on initial render.
School Show — Tabbed Nested Resources (Turbo Frames)
Requirements
showpage is the only show page in the admin interface; it exists solely to host tabs for Students, Classrooms, Teachers.indexaction inside a Turbo Frame — no separate tab-specific views/partials.indexTurbo Frame id is generated via thedom_idhelper (e.g.dom_id(@school, :teachers)), not a hardcoded string.loading: :lazy) so only the active tab's data is fetched.school_path(@school, tab: "teachers")).tabparam to determine which tab is active/expanded on initial render.