mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:51:43 +00:00
poder vaciar arrays closes #219
This commit is contained in:
parent
360b999dcb
commit
419749b912
2 changed files with 8 additions and 1 deletions
|
@ -7,6 +7,12 @@ class MetadataArray < MetadataTemplate
|
||||||
super || []
|
super || []
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Los Arrays no se pueden cifrar todavía
|
||||||
|
# TODO: Cifrar y decifrar arrays
|
||||||
|
def private?
|
||||||
|
false
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def sanitize(values)
|
def sanitize(values)
|
||||||
|
@ -16,6 +22,6 @@ class MetadataArray < MetadataTemplate
|
||||||
else
|
else
|
||||||
v
|
v
|
||||||
end
|
end
|
||||||
end
|
end.select(&:present?)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag "#{base}_#{attribute}", post_label_t(attribute, post: post)
|
= 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,
|
.taggable{ dir: dir, lang: locale, data: { values: metadata.value.to_json,
|
||||||
name: "#{base}[#{attribute}][]", list: id_for_datalist(attribute),
|
name: "#{base}[#{attribute}][]", list: id_for_datalist(attribute),
|
||||||
|
|
Loading…
Reference in a new issue