mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 03:51:41 +00:00
si no hay traducción devolver el nombre del campo
This commit is contained in:
parent
91a75b08d0
commit
a0c88457cc
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ class Site
|
|||
#
|
||||
# @return String
|
||||
def t(field)
|
||||
dig(field.to_s, 'label', I18n.locale.to_s)
|
||||
dig(field.to_s, 'label', I18n.locale.to_s) || field.to_s
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -52,7 +52,7 @@ class Site
|
|||
# @return Site::Forms::Form
|
||||
def form(name)
|
||||
@cached_forms ||= {}
|
||||
@cached_forms[name] ||= Form[data.dig('forms', name).reject { |k,_| excluded? k }]
|
||||
@cached_forms[name] ||= Form[data.dig('forms', name).reject { |k, _| excluded? k }]
|
||||
end
|
||||
|
||||
# Detecta si el campo está excluido del formulario final
|
||||
|
|
Loading…
Reference in a new issue