Fix last_comment_at logic (#99)

* Limit Google Optimize to 35% of loads

* Fix last_comment_at logic
This commit is contained in:
Ben Halpern 2018-03-18 15:15:07 -04:00 committed by GitHub
parent d865788438
commit 74664ddf33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -402,7 +402,9 @@ class Article < ApplicationRecord
end
def set_last_comment_at
self.last_comment_at = published_at if published_at.present? && last_comment_at.blank?
if published_at.present? && last_comment_at == "Sun, 01 Jan 2017 05:00:00 UTC +00:00"
self.last_comment_at = published_at
end
end
def title_to_slug