posts: fix rare bug with first post.

Fix a rare bug that occurs once per year that causes post 1 to appear
insufficiently festive.
This commit is contained in:
evazion
2021-05-23 06:33:29 -05:00
parent 6cfdf51795
commit c7fda2772f
4 changed files with 15 additions and 1 deletions

View File

@@ -41,4 +41,8 @@ module PostsHelper
source
end
end
def is_danbirthday?(post)
post.id == 1 && post.created_at.strftime("%m-%d") == Time.zone.today.strftime("%m-%d")
end
end