Server side code for Watching First Post Only

This commit is contained in:
Robin Ward
2016-07-06 15:56:40 -04:00
parent 1eb64151f6
commit 2005565c9c
13 changed files with 112 additions and 39 deletions

View File

@@ -1,3 +1,5 @@
require_dependency 'notification_levels'
class TopicUser < ActiveRecord::Base
belongs_to :user
belongs_to :topic
@@ -17,10 +19,7 @@ class TopicUser < ActiveRecord::Base
# Enums
def notification_levels
@notification_levels ||= Enum.new(muted: 0,
regular: 1,
tracking: 2,
watching: 3)
NotificationLevels.topic_levels
end
def notification_reasons