5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 13:54:17 +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,10 +2,15 @@
# 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
if post.date.value.to_date < Time.now.to_date
post.date.value
else
Time.now
end
end
# Nunca cambia
def value=(new_value)