0
0
Fork 0

Fix error on trending hashtags/links pages in admin UI due to missing constant (#17044)

This commit is contained in:
Eugen Rochko 2021-11-26 01:12:39 +01:00 committed by GitHub
parent b1fd6d4490
commit 12b3ff6c6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View file

@ -84,6 +84,10 @@ class PreviewCard < ApplicationRecord
attributes['trendable'].nil? && (provider.nil? || provider.requires_review_notification?)
end
def decaying?
max_score_at && max_score_at >= Trends.links.options[:max_score_cooldown].ago && max_score_at < 1.day.ago
end
attr_writer :provider
def local?