5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 08:56:20 +00:00

fix: no enviar valores inversos vacíos

This commit is contained in:
f 2024-10-23 15:24:47 -03:00
parent 7ebc171cab
commit 52322c15c5
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View file

@ -75,6 +75,7 @@
Enviamos valores vacíos o arrastrados desde el formulario anterior
para los atributos ignorados
- except.each do |attr|
%input{ type: 'hidden', name: "#{base}[#{attr}]", value: pluck_param(attr, optional: true) }
- if (value = pluck_param(attr, optional: true)).present?
%input{ type: 'hidden', name: "#{base}[#{attr}]", value: value }
= yield(:post_form)

View file

@ -59,7 +59,7 @@
= render 'posts/attributes', site: site, post: post, dir: dir, base: base, locale: locale, except: except
-# @todo Volver obligatorios?
- except.each do |attr|
- if (value = pluck_param(attr, optional: true))
- if (value = pluck_param(attr, optional: true)).present?
= hidden_field_tag "#{base}[#{attr}]", value
- content_for :"#{modal_id}_footer" do