mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 13:46:22 +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
|
# @deprecated Empezar a usar locale
|
||||||
# @return [String]
|
# @return [String]
|
||||||
def lang
|
def lang
|
||||||
@lang ||= post&.lang&.value || I18n.locale
|
@lang ||= post&.lang&.value || I18n.locale.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
alias_method :locale, :lang
|
alias_method :locale, :lang
|
||||||
|
|
||||||
|
# El valor por defecto desde el esquema de datos
|
||||||
|
#
|
||||||
|
# @return [any]
|
||||||
def default_value
|
def default_value
|
||||||
layout.metadata.dig(name, 'default', lang.to_s)
|
layout.metadata.dig(name, 'default', lang)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Valores posibles, busca todos los valores actuales en otros
|
# Valores posibles, busca todos los valores actuales en otros
|
||||||
|
|
Loading…
Reference in a new issue