Category dropdown should be in the `position` order
This commit is contained in:
parent
3dd4741ce4
commit
914b723b97
|
@ -1,8 +1,8 @@
|
||||||
<section class="category-column first">
|
<section class="category-column first">
|
||||||
{{each categoriesOdd itemViewClass="Discourse.FeaturedTopicsView"}}
|
{{each categoriesEven itemViewClass="Discourse.FeaturedTopicsView"}}
|
||||||
</section>
|
</section>
|
||||||
<section class="category-column">
|
<section class="category-column">
|
||||||
{{each categoriesEven itemViewClass="Discourse.FeaturedTopicsView"}}
|
{{each categoriesOdd itemViewClass="Discourse.FeaturedTopicsView"}}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class='clearfix'></div>
|
<div class='clearfix'></div>
|
|
@ -45,6 +45,8 @@ class Category < ActiveRecord::Base
|
||||||
has_one :category_search_data
|
has_one :category_search_data
|
||||||
belongs_to :parent_category, class_name: 'Category'
|
belongs_to :parent_category, class_name: 'Category'
|
||||||
|
|
||||||
|
default_scope order('position')
|
||||||
|
|
||||||
scope :latest, ->{ order('topic_count desc') }
|
scope :latest, ->{ order('topic_count desc') }
|
||||||
|
|
||||||
scope :secured, ->(guardian = nil) {
|
scope :secured, ->(guardian = nil) {
|
||||||
|
|
Loading…
Reference in New Issue