name: rails-forms description: Rails form conventions. Use when creating or editing forms in Rails.
Rails Forms
Guidelines
- Inspect existing form patterns in the codebase first.
- Always use
form_withwhen creating or modifying forms. - Use the
turbo_datahelper for Turbo-related data attributes. - For form actions, always use the
form_actionscomponent.
Form fields
- Prefer using the
form_fieldcomponent with the appropriate field type; for hidden fields, usehidden_fieldinstead; use field type:baseonly in rare cases for custom fields not used elsewhere in the codebase. - Add custom labels, hints, and help texts via I18n using the keys expected by the
form_fieldcomponent. Check the component for the expected I18n keys. - When adding I18n entries, update all locales in use.
chat Comments (0)
Sign in to join the discussion and leave a comment.
Skill Details
GitHub Stars
0
GitHub Forks
1
Created
Jan 2026
Last Updated
5个月前
tools
tools cms platforms
Related Skills
Build your own?
Join 12,000+ developers contributing to the Claude ecosystem.
No comments yet. Be the first to share your thoughts!