Skip to content

Commit

Permalink
Set form_with_generates_remote_forms to false as it is default value
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan committed Nov 11, 2024
1 parent 6020fd6 commit 18b97b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/datagrid/helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
options.is_a?(String) ? options : ["/location", options.to_param.presence].compact.join("?")
end

# Rails defaults since 6.x
# Rails defaults since 6.1
ActionView::Helpers::FormHelper.form_with_generates_ids = true
ActionView::Helpers::FormHelper.form_with_generates_remote_forms = false
ActionView::Helpers::FormTagHelper.default_enforce_utf8 = false
end

Expand Down Expand Up @@ -533,7 +534,7 @@ class FormWithGrid < Datagrid::Base
end
object = FormWithGrid.new(category: "hello")
expect(subject.datagrid_form_with(model: object, url: "/grid")).to equal_to_dom(<<~HTML)
<form class="datagrid-form" action="/grid" accept-charset="UTF-8" data-remote="true" method="get">
<form class="datagrid-form" action="/grid" accept-charset="UTF-8" method="get">
<div class="datagrid-filter" data-filter="category" data-type="string">
<label for="form_with_grid_category">Category</label>
<input value="hello" type="text" name="form_with_grid[category]" id="form_with_grid_category" />
Expand Down

0 comments on commit 18b97b3

Please sign in to comment.