mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:21:41 +00:00
detectar si el campo admite multiples valores o solo uno
This commit is contained in:
parent
f3fa462492
commit
f3dca28ce0
1 changed files with 4 additions and 1 deletions
|
@ -80,7 +80,10 @@ class Post
|
|||
|
||||
# TODO detectar cuando es complejo y tomar el valor de :multiple
|
||||
def multiple?
|
||||
array?
|
||||
# si la plantilla es simple, es multiple cuando tenemos un array
|
||||
return array? if simple?
|
||||
|
||||
contents.fetch('multiple', true)
|
||||
end
|
||||
|
||||
# Detecta si el valor es una tabla de campos
|
||||
|
|
Loading…
Reference in a new issue