mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 11:56:21 +00:00
fix: MetadataTemplate#locale es una String
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
c241f25105
commit
833022c9c4
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue