From 05579d1bf96ab1cb46f2272a7f1c3e414d42d655 Mon Sep 17 00:00:00 2001 From: Alan Cornthwaite Date: Thu, 28 May 2026 12:42:38 +0930 Subject: [PATCH] Orderable: Remove form from visible flow --- .../katalyst/tables/orderable/form_component.rb | 8 +++++++- spec/components/katalyst/tables/orderable_spec.rb | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/components/katalyst/tables/orderable/form_component.rb b/app/components/katalyst/tables/orderable/form_component.rb index 8dec934..6cad155 100644 --- a/app/components/katalyst/tables/orderable/form_component.rb +++ b/app/components/katalyst/tables/orderable/form_component.rb @@ -21,9 +21,15 @@ def initialize(collection:, url:, id: nil, scope: nil) end def call - form_with(id:, url:, method: :patch, data: { + form_with(id:, + url:, + method: :patch, + data: { controller: FORM_CONTROLLER, "#{FORM_CONTROLLER}-scope-value": @scope, + }, + html: { + hidden: "", }) do |form| form.button(hidden: "") end diff --git a/spec/components/katalyst/tables/orderable_spec.rb b/spec/components/katalyst/tables/orderable_spec.rb index b440bc8..a56dc49 100644 --- a/spec/components/katalyst/tables/orderable_spec.rb +++ b/spec/components/katalyst/tables/orderable_spec.rb @@ -38,7 +38,7 @@
+ action="/faqs/order" accept-charset="UTF-8" method="post" hidden="hidden">