From 7ba2b677a66b363fcf161ed0526b4f825ffc0e9e Mon Sep 17 00:00:00 2001 From: Blake Erickson Date: Tue, 19 Nov 2019 10:10:14 -0700 Subject: [PATCH] DEV: Use enum instead of id for topic timer query Follow up to 266e4860378dae148718632f4e1eced6384f3d87 --- app/models/topic_timer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/topic_timer.rb b/app/models/topic_timer.rb index 8c7f3056e67..1599f77ce54 100644 --- a/app/models/topic_timer.rb +++ b/app/models/topic_timer.rb @@ -17,7 +17,7 @@ class TopicTimer < ActiveRecord::Base validate :ensure_update_will_happen - scope :scheduled_bump_topics, -> { where(status_type: 6, deleted_at: nil).pluck(:topic_id) } + scope :scheduled_bump_topics, -> { where(status_type: TopicTimer.types[:bump], deleted_at: nil).pluck(:topic_id) } before_save do self.created_at ||= Time.zone.now if execute_at