rails-forms
Rails form conventions. Use when creating or editing forms in Rails.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
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.
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!