From b9ec8a6756aa716c7693263afb02125c26c27655 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 14 Oct 2024 13:16:30 -0300 Subject: [PATCH] fix: date_field necesita strftime en el atributo closes #17530 closes #17575 closes #17576 closes #17577 closes #17580 closes #17581 closes #17582 closes #17584 closes #17586 closes #17588 closes #17589 closes #17590 --- app/models/metadata_date.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/models/metadata_date.rb b/app/models/metadata_date.rb index ecc5d06a..5a96871a 100644 --- a/app/models/metadata_date.rb +++ b/app/models/metadata_date.rb @@ -19,6 +19,14 @@ class MetadataDate < MetadataTemplate end end + # Delegar el formato al valor, para uso dentro de date_field() + # + # @param format [String] + # @return [String,nil] + def strftime(format) + value&.strftime(format) + end + # Devuelve una fecha, si no hay ninguna es la fecha de hoy. # # @return [Date]