Fix last_comment_at issue (#38)

* Fix last_comment_at issue
This commit is contained in:
Ben Halpern 2018-03-05 01:33:32 -05:00 committed by GitHub
parent 12b389ff3f
commit de23dfe353
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -363,7 +363,7 @@ class Article < ApplicationRecord
end
def set_last_comment_at
self.last_comment_at = Time.now if published && last_comment_at.blank?
self.last_comment_at = Time.now if published && last_comment_at < 30.days.ago
end
def title_to_slug