include mods+admins in janitor report for comparison

This commit is contained in:
r888888888
2015-06-18 12:29:24 -07:00
parent f29918c097
commit 5923d869aa
3 changed files with 9 additions and 9 deletions

View File

@@ -1,14 +1,14 @@
module Reports
class JanitorTrials
class Janitor
attr_reader :trial
attr_reader :user
def initialize(trial)
@trial = trial
def initialize(user)
@user = user
end
def user
trial.user
def trial
JanitorTrial.where(user_id: user.id).first
end
def since
@@ -39,7 +39,7 @@ module Reports
end
def janitors
JanitorTrial.where(status: "active").to_a.map {|x| Janitor.new(x)}
User.where("level >= ?", User::Levels::JANITOR).to_a.map {|x| Janitor.new(x)}
end
end
end