The following
<%= form_with scope: :section, url: sections_path, remote: true do |form| %>
<%= form.hidden_field :site_id, value: @site.id %><%= @site.id %>
is rendering
<input value="qeqe3ECw2R6GPikD9KyBHkhAb9UMdddOPzpB8tAp7yjFaHqZs/NX6Mu/i7ajW5StsGsU0AlXg831Jo7QLCgMWg==" type="hidden" name="section[site_id]" id="section_site_id">
1
Thus the @site.id is being recognized and rendered in the view, but in the input element, the value is not being as a key of sorts.
Where is this syntax awry?