mirror of
https://github.com/we-promise/sure.git
synced 2026-05-30 07:49:01 +00:00
refactor(modules): drop redundant hidden_field_tag in preferences view
DS::Toggle already renders its own `hidden_field_tag name, unchecked_value, id: nil` (app/components/DS/toggle.html.erb:2), so the explicit one I added was duplicating the unchecked-value field — and was the root cause of the ID collision the prior commit worked around with `id: nil`. Removing the redundant line is the correct fix; live-tested via Playwright (toggle persists, off-state arrives as "0" through the DS-provided hidden).
This commit is contained in:
@@ -246,7 +246,6 @@
|
||||
<h5 class="text-primary"><%= t("modules.#{module_name}.title") %></h5>
|
||||
<p class="text-secondary"><%= t("modules.#{module_name}.description") %></p>
|
||||
</div>
|
||||
<%= hidden_field_tag "family[modules][#{module_name}]", "0", id: nil %>
|
||||
<%= render DS::Toggle.new(
|
||||
id: "family_modules_#{module_name}",
|
||||
name: "family[modules][#{module_name}]",
|
||||
|
||||
Reference in New Issue
Block a user