sutty/app/models/metadata_predefined_array.rb

11 lines
250 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# Una lista de valores predefinidos
class MetadataPredefinedArray < MetadataArray
def values
@values ||= layout.dig(:metadata, name, 'values')&.map do |k, v|
2020-11-07 23:51:00 +00:00
[v[I18n.locale.to_s], k]
end&.to_h
end
end