5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 05:01:41 +00:00
panel/app/models/metadata_array.rb

26 lines
359 B
Ruby
Raw Normal View History

2019-08-06 17:54:17 +00:00
# frozen_string_literal: true
# Una lista de valores
class MetadataArray < MetadataTemplate
# El valor por defecto es una array vacía
def default_value
[]
end
2019-08-13 23:33:57 +00:00
def to_param
{ name => [] }
end
private
def sanitize(values)
values.map do |v|
if v.is_a? String
super(v)
else
v
end
end
end
2019-08-06 17:54:17 +00:00
end