changeset 418:a9921f3e9088 bug_133

Use all with ordering instead of sort_by for projects (fixes #133)
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 10 May 2011 11:39:27 +0100
parents 405dd646a6cc
children c759f8787b07 19549b0c417a 49a3585c24b1
files app/controllers/projects_controller.rb
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/app/controllers/projects_controller.rb	Tue May 10 10:09:02 2011 +0100
+++ b/app/controllers/projects_controller.rb	Tue May 10 11:39:27 2011 +0100
@@ -59,7 +59,9 @@
         @offset ||= @project_pages.current.offset
         @projects = Project.visible_roots.all(:offset => @offset, :limit => @limit, :order => sort_clause) 
         if User.current.logged?
-          @user_projects = User.current.projects.sort_by(&:name)
+          # seems sort_by gives us case-sensitive ordering, which we don't want
+#          @user_projects = User.current.projects.sort_by(&:name)
+          @user_projects = User.current.projects.all(:order => :name)
         end
         render :template => 'projects/index.rhtml', :layout => !request.xhr?
       }