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

form_with with validate: false on Rails 8 exception fix #975

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

maxnovee
Copy link
Contributor

that should fix #974

@tagliala
Copy link
Contributor

Ah, the logger issue.

Please allow me to fix the CI, I will then ask you to rebase

form_with(validate: false)
end

assert_dom "form"
Copy link
Contributor

Choose a reason for hiding this comment

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

in the meanwhile, this is for sure an issue to fix

Copy link
Contributor Author

@maxnovee maxnovee Jan 29, 2025

Choose a reason for hiding this comment

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

I can change to what @grantbdev added in the issue if these are a better fit

def test_form_with_without_model_without_validation
  form_with(url: '/posts') do |f|
    concat f.text_field(:cost)
  end

  expected = whole_form_with('/posts') do
    form_field('input', id: 'cost', name: 'cost', type: 'text')
  end

  assert_dom_equal expected, output_buffer
end

@tagliala
Copy link
Contributor

@maxnovee done, please rebase

@coveralls
Copy link

coveralls commented Jan 29, 2025

Coverage Status

coverage: 99.807%. remained the same
when pulling bbaac22 on maxnovee:form-with-rails-8-super-fix
into 96ef17d on DavyJonesLocker:main.

@tagliala
Copy link
Contributor

Great, all green. Can you:

Ensure that super `form_with` is called with the right arguments.

Fix #974
@maxnovee maxnovee force-pushed the form-with-rails-8-super-fix branch from b59fb1c to bbaac22 Compare January 29, 2025 12:34
@tagliala
Copy link
Contributor

Thanks!

I'll backport this change do 22-stable and then release 22.3.1 instead of going to 23.0 directly

@maxnovee
Copy link
Contributor Author

My pleasure!

Looking forward to get the hotfix.

@tagliala tagliala merged commit 77a4aa4 into DavyJonesLocker:main Jan 29, 2025
28 checks passed
@tagliala
Copy link
Contributor

22.3.1 pushed to rubygems, thanks again

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.

form_with default argument raises exception on Rails 8.0
3 participants