Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow form field names to end in "?" #1575

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

neall
Copy link
Contributor

@neall neall commented Nov 4, 2022

Description

Rails will allow input names that end in a question mark and call the appropriate method on the model to (for example) decide if a checkbox should start off as "checked". This change ensures we can still find a caption template associated with a field named with a question mark, but not have to embed a question mark in the template file name.

Integration

No changes in production. (Prod doesn't use this feature yet.)

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews

@neall neall requested review from a team and camertron November 4, 2022 18:23
@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2022

🦋 Changeset detected

Latest commit: ba3f20d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@neall neall temporarily deployed to github-pages November 4, 2022 18:28 Inactive
Rails will allow input names that end in a question mark and call the
appropriate method on the model to (for example) decide if a checkbox
should start off as "checked". This change ensures we can still find a
caption template associated with a field named with a question mark, but
not have to embed a question mark in the template file name.

Co-Authored-By: Cameron Dutro <[email protected]>
@neall neall force-pushed the neall/allow-question-marks-in-form-field-names branch from 14d1352 to ba3f20d Compare November 4, 2022 18:29
@neall neall temporarily deployed to github-pages November 4, 2022 18:34 Inactive
Copy link
Contributor

@camertron camertron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@neall neall merged commit eead9f6 into main Nov 4, 2022
@neall neall deleted the neall/allow-question-marks-in-form-field-names branch November 4, 2022 18:39
@primer-css primer-css mentioned this pull request Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants