Hotwire
cm-admin views load inside Turbo frames. Two attributes cover almost every issue you hit when adding custom links or forms.
Links inside Turbo Framesβ
Links inside a Turbo Frame navigate within the frame instead of loading the full page. Add data: { turbo_frame: "_top" } to links that should break out:
link_to "View details", some_path, data: { turbo_frame: "_top" }
cm-admin does this itself for record links rendered inside framed tables. If every link in a frame should break out, set target="_top" on the turbo-frame element instead.
Forms and links that must reload the pageβ
If a form or link does a full state change β sign in, password change, redirects outside the panel β opt out of Turbo entirely:
form_tag('/update_password', data: { turbo: false }) do
link_to "Forgot Password?", reset_password_path, data: { turbo: false }
Without turbo: false, the response renders inside the current frame and page-level behaviour (redirects, flashes, head changes) can silently break.
Relatedβ
- UI
- Custom actions β custom
partialpages are the usual place these attributes are needed