5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 04:44:15 +00:00

poder vaciar arrays closes #219

This commit is contained in:
f 2021-02-11 12:13:18 -03:00
parent 360b999dcb
commit 419749b912
2 changed files with 8 additions and 1 deletions

View file

@ -7,6 +7,12 @@ class MetadataArray < MetadataTemplate
super || []
end
# Los Arrays no se pueden cifrar todavía
# TODO: Cifrar y decifrar arrays
def private?
false
end
private
def sanitize(values)
@ -16,6 +22,6 @@ class MetadataArray < MetadataTemplate
else
v
end
end
end.select(&:present?)
end
end

View file

@ -1,5 +1,6 @@
.form-group
= label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post)
= hidden_field_tag "#{base}[#{attribute}][]", ''
.taggable{ dir: dir, lang: locale, data: { values: metadata.value.to_json,
name: "#{base}[#{attribute}][]", list: id_for_datalist(attribute),