rails-hotwire-frontend
Installation
SKILL.md
Rails Hotwire Frontend
Turbo
General Rules
- Prefer Turbo Morph for dynamic partial updates — add
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>toapplication.html.erb - Use
dom_id(model)for all DOM targeting; avoid hard-coded DOM IDs - Avoid page reloads when Turbo Stream or Frame can handle the change
- Do not nest Turbo Frames unless parent and child actions are clearly separated
Turbo Streams vs Frames
- Use Turbo Streams for in-place updates (lists, tables, comment feeds)
- Use Turbo Frames for isolated page fragments with independent rendering (modals, tabs)