5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-17 04:26:21 +00:00

fix: usar los posts indexados para obtener la diferencia

This commit is contained in:
f 2023-04-20 21:14:12 -03:00
parent 0567e491ee
commit 498c8cc5ad

View file

@ -45,7 +45,7 @@ class Site
#
# @return [Boolean]
def awaiting_publication?
updated_at > (build_stats.jekyll.where(status: true).last&.created_at || updated_at)
waiting? && updated_at >= (indexed_posts.order(updated_at: :desc).select(:updated_at).first&.updated_at || 1.second.ago)
end
end
end