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

BIB-66: Fix 'ActionView::Template::Error: include_blank cannot be false for a required field.' #2589

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

torresga
Copy link
Contributor

@torresga torresga commented Oct 7, 2024

This PR fixes the following test failure in spec/requests/organized/model_audits_request_spec.rb:


Failure/Error: = f.select(:kind, opts, {include_blank: false, required: true}, {class: 'form-control'})


ActionView::Template::Error:

  include_blank cannot be false for a required field.

I’m not exactly sure why that code passes in Rails 7.0 but fails in Rails 7.1. I think it has to do with the difference in the implementation of the select_content_tag:

See select_content_tag in https://github.com/rails/rails/blob/7-1-stable/actionview/lib/action_view/helpers/tags/select_renderer.rb#L17 vs

select_content_tag in Rails 7.0: https://github.com/rails/rails/blob/7-0-stable/actionview/lib/action_view/helpers/tags/base.rb#123

@torresga torresga changed the base branch from BIB-46-dual-boot-with-rails-7-1 to main October 9, 2024 13:37
@mateusdeap mateusdeap marked this pull request as ready for review October 9, 2024 13:58
@fbuys fbuys force-pushed the BIB-66-update-include-blank branch from f468f08 to cea8486 Compare October 9, 2024 14:25
@sethherr sethherr changed the base branch from main to BIB-49-rails-7-production October 14, 2024 16:49
@sethherr sethherr merged commit d7d59cd into BIB-49-rails-7-production Oct 14, 2024
5 checks passed
@sethherr sethherr deleted the BIB-66-update-include-blank branch October 14, 2024 16:53
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.

3 participants