Merge pull request #1707 from chancancode/as_json_fix

The Rails JSON encoder API requires `as_json` to take an optional arg
This commit is contained in:
Sam
2013-11-30 03:40:21 -08:00
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,

View File

@@ -8,7 +8,7 @@ class IncomingLinksReport
@data = nil
end
def as_json
def as_json(options = nil)
{
type: self.type,
title: I18n.t("reports.#{self.type}.title"),

View File

@@ -11,7 +11,7 @@ class Report
@prev30Days = nil
end
def as_json
def as_json(options = nil)
{
type: self.type,
title: I18n.t("reports.#{self.type}.title"),