From 256a8b1da0cf73c95c2718ceb45d03ea40ffdf2c Mon Sep 17 00:00:00 2001 From: f Date: Mon, 21 Oct 2024 16:42:28 -0300 Subject: [PATCH] =?UTF-8?q?fix:=20no=20enviar=20valores=20inversos=20vac?= =?UTF-8?q?=C3=ADos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/posts/modal.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/posts/modal.haml b/app/views/posts/modal.haml index 6875cea8..e589dfa8 100644 --- a/app/views/posts/modal.haml +++ b/app/views/posts/modal.haml @@ -59,7 +59,8 @@ = render 'posts/attributes', site: site, post: post, dir: dir, base: base, locale: locale, except: except -# @todo Volver obligatorios? - except.each do |attr| - %input{ type: 'hidden', name: "#{base}[#{attr}]", value: pluck_param(attr, optional: true) } + - if (value = pluck_param(attr, optional: true)) + = hidden_field_tag "#{base}[#{attr}]", value - content_for :"#{modal_id}_footer" do -# = render 'posts/validation', site: site, invalid: { id: invalid_id }, submitting: { id: submitting_id }