5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 11:46:22 +00:00

fix: MetadataTemplate#locale es una String
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
f 2023-10-06 17:35:54 -03:00
parent c241f25105
commit 833022c9c4
No known key found for this signature in database

View file

@ -66,13 +66,16 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type,
# @deprecated Empezar a usar locale
# @return [String]
def lang
@lang ||= post&.lang&.value || I18n.locale
@lang ||= post&.lang&.value || I18n.locale.to_s
end
alias_method :locale, :lang
# El valor por defecto desde el esquema de datos
#
# @return [any]
def default_value
layout.metadata.dig(name, 'default', lang.to_s)
layout.metadata.dig(name, 'default', lang)
end
# Valores posibles, busca todos los valores actuales en otros