From 6cca7a4a3a82f6bf91d12a57b40b63c29e31af91 Mon Sep 17 00:00:00 2001 From: David Cook Date: Fri, 9 Feb 2024 09:34:11 +1100 Subject: [PATCH] Refactor HAML Making use of nested hash to DRY it up --- app/views/admin/products_v3/_table.html.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/admin/products_v3/_table.html.haml b/app/views/admin/products_v3/_table.html.haml index 01754ab4ce..1079e28db4 100644 --- a/app/views/admin/products_v3/_table.html.haml +++ b/app/views/admin/products_v3/_table.html.haml @@ -1,9 +1,9 @@ = form_with url: bulk_update_admin_products_path, method: :patch, id: "products-form", builder: BulkFormBuilder, - html: {'data-reflex-serialize-form': true, 'data-reflex': 'submit->products#bulk_update', - 'data-controller': "bulk-form", 'data-bulk-form-disable-selector-value': "#sort,#filters", - 'data-bulk-form-error-value': defined?(error_counts), - } do |form| + html: { data: { reflex: 'submit->products#bulk_update', 'reflex-serialize-form': true, + controller: "bulk-form", 'bulk-form-disable-selector-value': "#sort,#filters", + 'bulk-form-error-value': defined?(error_counts), + } } do |form| = render(partial: "admin/shared/flashes", locals: { flashes: }) if defined? flashes %table.products %col{ width:"4%" }