Refix category display. Refs #2162
This commit is contained in:
parent
0255334bc5
commit
38f96adbba
|
@ -19,7 +19,7 @@ class CategoriesController < ApplicationController
|
||||||
can_perform? @platform
|
can_perform? @platform
|
||||||
@categories = Category.select('categories.id, categories.name, categories.ancestry, count(projects.id) projects_count').
|
@categories = Category.select('categories.id, categories.name, categories.ancestry, count(projects.id) projects_count').
|
||||||
joins(:projects => :repositories).where('repositories.platform_id = ?', @platform.id).
|
joins(:projects => :repositories).where('repositories.platform_id = ?', @platform.id).
|
||||||
having('projects_count > 0').group('categories.id, categories.name, categories.ancestry').default_order
|
having('projects_count > 0').group('categories.id, categories.name, categories.ancestry, projects_count').default_order
|
||||||
render 'index2'
|
render 'index2'
|
||||||
else
|
else
|
||||||
@categories = Category.default_order.paginate(:page => params[:page])
|
@categories = Category.default_order.paginate(:page => params[:page])
|
||||||
|
|
Loading…
Reference in New Issue