diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 8023042ff..c0050d646 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -326,17 +326,17 @@ class ProjectsController < ApplicationController @s_type = 2 end else - @offset ||= @project_pages.reverse_offset + @offset ||= @project_pages.reverse_offset unless @offset == 0 - @projects_status = @projects_status.reorder('changesets_count').offset(@offset).limit(@limit).all.reverse + @projects_status = @projects_status.offset(@offset).limit(@limit).all.reverse else limit = @project_count % @limit if limit == 0 limit = @limit end - @projects_status = @projects_status.reorder('changesets_count').offset(@offset).limit(limit).all.reverse + @projects_status = @projects_status.offset(@offset).limit(limit).all.reverse end - @s_type = 1 + @s_type = 0 # @projects = @projects.sort {|x,y| y.created_on <=> x.created_on } # @projects = @projects[@offset, @limit] end