From 12b3ff6c6d70df1ce34f4b103b519250c9e2d2c8 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 26 Nov 2021 01:12:39 +0100 Subject: Fix error on trending hashtags/links pages in admin UI due to missing constant (#17044) --- app/models/tag.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models/tag.rb') 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 -- cgit