Include pinned topics in category list.

- removes an (n+1) query for user data
- supports the preload store for the data to avoid a second request
- fix a bug where uncategorizes was reporting (0, 0, 0) for topics by week, month, year
This commit is contained in:
Robin Ward
2013-05-28 14:54:00 -04:00
parent 29bf540a34
commit 560fb15d8a
9 changed files with 146 additions and 85 deletions

View File

@@ -0,0 +1,6 @@
class AddRankToCategoryFeaturedTopics < ActiveRecord::Migration
def change
add_column :category_featured_topics, :rank, :integer, default: 0, null: false
add_index :category_featured_topics, [:category_id, :rank]
end
end