mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-20 16:16:21 +00:00
Merge branch 'issue-14169' of https://0xacab.org/sutty/sutty into 17.3.alpine.panel.sutty.nl
This commit is contained in:
commit
87cffd7f80
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue