aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_track_controller.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-02-19 13:02:48 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-02-19 15:33:31 +1100
commitf13808623671668a7f5e1fda2f2f2106d9699966 (patch)
treefe0d1c40562c236533be6bfe89e1ff6fee53e080 /app/controllers/admin_track_controller.rb
parentb6686781bd378c44e7ccf3557969547c61e9248f (diff)
Merge in adminbootstraptheme 323d704ab4f1ffe31f20fcabeaf030c462dfbadf into main project
Diffstat (limited to 'app/controllers/admin_track_controller.rb')
-rw-r--r--app/controllers/admin_track_controller.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/admin_track_controller.rb b/app/controllers/admin_track_controller.rb
index 03217da45..525c96782 100644
--- a/app/controllers/admin_track_controller.rb
+++ b/app/controllers/admin_track_controller.rb
@@ -9,6 +9,7 @@ class AdminTrackController < AdminController
@query = params[:query]
@admin_tracks = TrackThing.paginate :order => "created_at desc", :page => params[:page], :per_page => 100,
:conditions => @query.nil? ? nil : ["lower(track_query) like lower('%'||?||'%')", @query ]
+ @popular = ActiveRecord::Base.connection.select_all("select count(*) as count, title, info_request_id from track_things join info_requests on info_request_id = info_requests.id where info_request_id is not null group by info_request_id, title order by count desc limit 10;")
end
private