DEV: Use enum instead of id for topic timer query

Follow up to 266e486037
This commit is contained in:
Blake Erickson 2019-11-19 10:10:14 -07:00
parent 266e486037
commit 7ba2b677a6
1 changed files with 1 additions and 1 deletions

View File

@ -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