Skip to content

Commit

Permalink
Set new rails default ActionView::Helpers::FormTagHelper.default_enfo…
Browse files Browse the repository at this point in the history
…rce_utf8 = false
  • Loading branch information
bogdan committed Nov 11, 2024
1 parent 9f99091 commit 845f8c8
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 @@ -20,6 +20,8 @@
allow(subject).to receive(:url_for) do |options|
options.is_a?(String) ? options : ["/location", options.to_param.presence].compact.join("?")
end

ActionView::Helpers::FormTagHelper.default_enforce_utf8 = false
end

let(:group) { Group.create!(name: "Pop") }
Expand Down Expand Up @@ -481,8 +483,7 @@ class FormForGrid
end
object = FormForGrid.new(category: "hello")
expect(subject.datagrid_form_for(object, url: "/grid")).to equal_to_dom(<<~HTML)
<form class="datagrid-form form_for_grid" id="new_form_for_grid" action="/grid" accept-charset="UTF-8" method="get">
<input name="utf8" type="hidden" value="&#x2713;" autocomplete="off" /> <div class="datagrid-filter filter">
<form class="datagrid-form form_for_grid" id="new_form_for_grid" action="/grid" accept-charset="UTF-8" method="get"> <div class="datagrid-filter filter">
<label for="form_for_grid_category">Category</label>
<input value="hello" class="category default_filter" type="text" name="form_for_grid[category]" id="form_for_grid_category" />
</div>
Expand Down

0 comments on commit 845f8c8

Please sign in to comment.