mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 01:17:16 +08:00
FIX: topic and post counts on /categories page should include sub-categories
This commit is contained in:
@ -44,6 +44,7 @@ class Category < ActiveRecord::Base
|
||||
|
||||
has_one :category_search_data
|
||||
belongs_to :parent_category, class_name: 'Category'
|
||||
has_many :subcategories, class_name: 'Category', foreign_key: 'parent_category_id'
|
||||
|
||||
scope :latest, ->{ order('topic_count desc') }
|
||||
|
||||
|
Reference in New Issue
Block a user