5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-02 16:26:07 +00:00

convertir valores en arrays por retrocompatibilidad

esto permite indexar sitios antiguos y cargar artículos sin generar
errores.
This commit is contained in:
f 2021-06-16 09:11:13 -03:00
parent 7191baff4a
commit 810c5e32da

View file

@ -23,6 +23,14 @@ class MetadataArray < MetadataTemplate
value.join(', ')
end
# Obtiene el valor desde el documento, convirtiéndolo a Array si no lo
# era ya, por retrocompabilidad.
#
# @return [Array]
def document_value
[super].flatten(1)
end
alias indexable_values values
private