Category dropdown should be in the `position` order

This commit is contained in:
Robin Ward 2013-11-06 15:50:47 -05:00
parent 3dd4741ce4
commit 914b723b97
2 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,8 @@
<section class="category-column first">
{{each categoriesOdd itemViewClass="Discourse.FeaturedTopicsView"}}
{{each categoriesEven itemViewClass="Discourse.FeaturedTopicsView"}}
</section>
<section class="category-column">
{{each categoriesEven itemViewClass="Discourse.FeaturedTopicsView"}}
{{each categoriesOdd itemViewClass="Discourse.FeaturedTopicsView"}}
</section>
<div class='clearfix'></div>

View File

@ -45,6 +45,8 @@ class Category < ActiveRecord::Base
has_one :category_search_data
belongs_to :parent_category, class_name: 'Category'
default_scope order('position')
scope :latest, ->{ order('topic_count desc') }
scope :secured, ->(guardian = nil) {