5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-23 01:06:22 +00:00

fix: los id no llevan corchetes

This commit is contained in:
f 2024-05-23 15:24:32 -03:00
parent 3552770076
commit c279d09f46
No known key found for this signature in database
3 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
-#
Genera un listado de checkboxes entre los que se puede elegir para guardar
:ruby
id = "#{base}_#{attribute}"
id = "#{base.gsub(/[\[\]]/, '_')}_#{attribute}".squeeze('_')
name = "#{base}[#{attribute}][]"
form_id = "form-#{Nanoid.generate}"

View file

@ -8,7 +8,7 @@
del formulario principal porque no se pueden anidar.
:ruby
id = "#{base}_#{attribute}"
id = "#{base.gsub(/[\[\]]/, '_')}_#{attribute}".squeeze('_')
name = "#{base}[#{attribute}][]"
form_id = "form-#{Nanoid.generate}"
modal_id = "modal-#{Nanoid.generate}"

View file

@ -3,7 +3,8 @@
guardar, pero no se pueden agregar nuevos.
:ruby
id = "#{base}_#{attribute}"
# @todo Convertir en un helper
id = "#{base.gsub(/[\[\]]/, '_')}_#{attribute}".squeeze('_')
name = "#{base}[#{attribute}][]"
form_id = "form-#{Nanoid.generate}"