Skip to content

Conversation

bhanubhakta
Copy link
Contributor

@bhanubhakta bhanubhakta commented Sep 22, 2023

Motivation / Background

The documentation says that the hidden input is only output if include_hidden: true is present. However, it is also output even if the include_hidden key is entirely absent. The documentation does not state that if the include_hidden key is not present it takes config.active_storage.multiple_file_field_include_hidden into account.

  • It adds proper documentation to avoid any further confusion as to why the hidden input field is present even if include_hidden is absent.

This Pull Request has been created because #48006
Fixes #48006

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message.

@rails-bot rails-bot bot added the actionview label Sep 22, 2023
Update `include_hidden: false` to `include_hidden: true`

Update the language to be more accurate.

Update actionview/lib/action_view/helpers/form_helper.rb

Co-authored-by: Hartley McGuire <skipkayhil@gmail.com>
@bhanubhakta bhanubhakta force-pushed the bhanubhakta-include-hidden-file-field-docs branch from 0cce0b7 to 72b3fe9 Compare September 25, 2023 01:45
@skipkayhil skipkayhil merged commit 162be9f into rails:main Sep 25, 2023
@skipkayhil
Copy link
Member

Thank you for contributing to Rails 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forms with file input now default to accepting 0 files
2 participants