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 GroupUser < ActiveRecord::Base
belongs_to :group, counter_cache: "user_count"
belongs_to :user
@@ -10,6 +12,10 @@ class GroupUser < ActiveRecord::Base
after_save :grant_trust_level
def self.notification_levels
NotificationLevels.all
end
protected
def set_primary_group