17 lines
255 B
Ruby
17 lines
255 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Un campo de idioma
|
||
|
class MetadataLang < MetadataTemplate
|
||
|
def default_value
|
||
|
I18n.locale
|
||
|
end
|
||
|
|
||
|
def value
|
||
|
self[:value] || document.collection.label.to_sym
|
||
|
end
|
||
|
|
||
|
def values
|
||
|
I18n.available_locales
|
||
|
end
|
||
|
end
|