diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 872071ce72..b00ef808ae 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,10 @@ nav_order: 5 ## main +* Document `config.view_component.capture_compatibility_patch_enabled` as option for the known incompatibilities with Rails form helpers + + *Tobias L. Maier* + * Add support for experimental inline templates. *Blake Williams* diff --git a/docs/known_issues.md b/docs/known_issues.md index 8845cd90d1..ae27f2d34a 100644 --- a/docs/known_issues.md +++ b/docs/known_issues.md @@ -22,6 +22,7 @@ Passing a form object (often `f`) to a ViewComponent works for simple cases like Some workarounds include: +- Experimental: Enable the capture compatibility patch with `config.view_component.capture_compatibility_patch_enabled = true`. - Render an entire form within a single ViewComponent. - Render a [partial](https://guides.rubyonrails.org/layouts_and_rendering.html#using-partials) within the ViewComponent which includes the form. - Use a [custom `FormBuilder`](https://guides.rubyonrails.org/form_helpers.html#customizing-form-builders) to create reusable form components: diff --git a/test/sandbox/test/rendering_test.rb b/test/sandbox/test/rendering_test.rb index f60350d6d8..828eefca09 100644 --- a/test/sandbox/test/rendering_test.rb +++ b/test/sandbox/test/rendering_test.rb @@ -415,7 +415,7 @@ def test_validations_component render_inline(ValidationsComponent.new) end - assert_equal "Validation failed: Content can't be blank", exception.message + assert_includes exception.message, "Validation failed: Content" end def test_compiles_unrendered_component