Skip to content

A platform for community discussion. Free, open, simple.

DEV: Use enum instead of id for topic timer query

Blake Erickson7ba2b677a66b
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