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/tag.rb | |
parent | b1fd6d44901a13450d22884b02eb6e9ae4fc1248 (diff) |
Fix error on trending hashtags/links pages in admin UI due to missing constant (#17044)
Diffstat (limited to 'app/models/tag.rb')
-rw-r--r-- | app/models/tag.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/tag.rb b/app/models/tag.rb index f35d92b5d..a64042614 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -80,6 +80,10 @@ class Tag < ApplicationRecord requires_review? && !requested_review? end + def decaying? + max_score_at && max_score_at >= Trends.tags.options[:max_score_cooldown].ago && max_score_at < 1.day.ago + end + def history @history ||= Trends::History.new('tags', id) end |