app/controllers/project_stats_controller.rb
# GET /project_stats/total_projects.json
# Dataset of total number of project entries.
# Path is total_projects_project_stats_path
# Note that this does NOT take a locale.
GET /project_stats/total_projects.json
Dataset of total number of project entries.
Path is total_projects_project_stats_path
Note that this does NOT take a locale.
GET / project_stats / total_projects . json Dataset of total number of project entries . Path is total_projects_project_stats_path Note that this does NOT take a locale .
def total_projects
    cache_until_next_stat
    dataset =
      ProjectStat.select(:created_at, :percent_ge_0).reduce({}) do |h, e|
        h.merge(e.created_at => e.percent_ge_0)
      end
    render_json_fast dataset
  end
def total_projects cache_until_next_stat dataset = ProjectStat . select ( :created_at , :percent_ge_0 ) . reduce ( { } ) do | h , e | h . merge ( e . created_at => e . percent_ge_0 ) end render_json_fast dataset end
GET /project_stats/total_projects.json
Dataset of total number of project entries.
GET / project_stats / total_projects . json Dataset of total number of project entries .