FEATURE: Can create warnings for users via PM

This commit is contained in:
Robin Ward
2014-09-05 15:40:25 -04:00
parent a8e4c4caa1
commit b0bfc1f93f
37 changed files with 243 additions and 18 deletions

View File

@ -98,7 +98,7 @@ class Notification < ActiveRecord::Base
def self.recent_report(user, count = nil)
count ||= 10
notifications = user.notifications.recent(count).includes(:topic).to_a
notifications = user.notifications.recent(count).includes({:topic => :warning}).to_a
if notifications.present?
notifications += user.notifications