Commit 01b55c22

mo khan <mo@mokhan.ca>
2013-08-31 14:17:19
sort the users list by the number of uploaded creations.
1 parent 099737f
Changed files (1)
app
app/controllers/profiles_controller.rb
@@ -2,7 +2,7 @@ class ProfilesController < ApplicationController
   before_filter :authenticate_user!, :except => [:index, :show]
 
   def index
-    @profiles = User.includes(:avatar).where('creations_count > 0').page(params[:page]).per(12)
+    @profiles = User.includes(:avatar).where('creations_count > 0').order(:creations_count => :desc).page(params[:page]).per(12)
   end
 
   def show