diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2021-11-26 01:12:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 01:12:39 +0100 |
commit | 12b3ff6c6d70df1ce34f4b103b519250c9e2d2c8 (patch) | |
tree | f64f6d487b6cb17342e9096296deb69d3adf4e98 /app/models/preview_card.rb | |
parent | b1fd6d44901a13450d22884b02eb6e9ae4fc1248 (diff) |
Fix error on trending hashtags/links pages in admin UI due to missing constant (#17044)
Diffstat (limited to 'app/models/preview_card.rb')
-rw-r--r-- | app/models/preview_card.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/preview_card.rb b/app/models/preview_card.rb index f2ab8ecab..0f9e23fa1 100644 --- a/app/models/preview_card.rb +++ b/app/models/preview_card.rb @@ -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? |