rails-forms
Rails form conventions. Use when creating or editing forms in Rails.
Installation
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
Voir la source ↗GuidesInstructions
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.
Exemples
Consultez les exemples du dépôt source.
Voir la source ↗Historique source
- Date d’indexation
- 2026-01-20
- Mise à jour de l’index
- 2026-01-26
- Branch
- main
Les dates concernent ce répertoire. Consultez le dépôt pour l’historique du code.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!