The Rails JSON encoder API requires as_json to take an optional arg

This commit is contained in:
Godfrey Chan
2013-11-29 21:43:44 -08:00
parent 7a60eacca9
commit 6bbea9de0b
6 changed files with 6 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ class AdminDashboardData
AdminDashboardData.new.problems
end
def as_json
def as_json(options = nil)
@json ||= {
reports: REPORTS.map { |type| Report.find(type).as_json },
admins: User.admins.count,