From 686894bd826e9686dfc6ca05ec94a6140f093598 Mon Sep 17 00:00:00 2001 From: Guillem Arias Date: Fri, 22 May 2026 15:29:41 +0200 Subject: [PATCH] refactor(modules): drop redundant hidden_field_tag in preferences view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- app/views/settings/preferences/show.html.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/settings/preferences/show.html.erb b/app/views/settings/preferences/show.html.erb index fd1ac48be..8c6649f2a 100644 --- a/app/views/settings/preferences/show.html.erb +++ b/app/views/settings/preferences/show.html.erb @@ -246,7 +246,6 @@
<%= t("modules.#{module_name}.title") %>

<%= t("modules.#{module_name}.description") %>

- <%= hidden_field_tag "family[modules][#{module_name}]", "0", id: nil %> <%= render DS::Toggle.new( id: "family_modules_#{module_name}", name: "family[modules][#{module_name}]",