diff options
author | francis <francis> | 2008-04-16 13:23:54 +0000 |
---|---|---|
committer | francis <francis> | 2008-04-16 13:23:54 +0000 |
commit | 9578d74785b3297d79fec7a6a017d84ea6ab0c9d (patch) | |
tree | 0852facaafa43b634d9ef97f4b01fd49f958d151 /app/controllers/admin_controller.rb | |
parent | 4f93923fbe3c1ae178c93d30c82f8b3a692ab6fe (diff) |
Stats page.
Diffstat (limited to 'app/controllers/admin_controller.rb')
-rw-r--r-- | app/controllers/admin_controller.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 64f367b92..ebd4beab6 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: admin_controller.rb,v 1.11 2008-04-11 16:10:12 francis Exp $ +# $Id: admin_controller.rb,v 1.12 2008-04-16 13:23:55 francis Exp $ class AdminController < ApplicationController layout "admin" @@ -47,6 +47,12 @@ class AdminController < ApplicationController @events.sort! { |a,b| b.created_at <=> a.created_at } end + def stats + @request_by_state = InfoRequest.count(:group => 'described_state') + @tracks_by_type = TrackThing.count(:group => 'track_type') + @tracks_by_medium = TrackThing.count(:group => 'track_medium') + end + def debug @request_env = request.env end |