5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-05-19 12:30:49 +00:00

fix: retrocompatibilidad
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
f 2023-09-13 18:07:25 -03:00
parent d27717ed3b
commit 99c919e5e6
No known key found for this signature in database

View file

@ -2,9 +2,14 @@
# Fecha y hora de creación
class MetadataCreatedAt < MetadataTemplate
# Por defecto la hora actual
# Por defecto la hora actual, pero por retrocompatibilidad, queremos
# la fecha de publicación
def default_value
Time.now
if post.date.value.to_date < Time.now.to_date
post.date.value
else
Time.now
end
end
# Nunca cambia