work in progress, live unread and new counts

This commit is contained in:
Sam
2013-05-28 17:52:52 +10:00
parent 33683715a9
commit 73834370a5
26 changed files with 213 additions and 93 deletions

View File

@@ -6,7 +6,13 @@ class ListController < ApplicationController
# Create our filters
[:latest, :hot, :favorited, :read, :posted, :unread, :new].each do |filter|
define_method(filter) do
list_opts = {page: params[:page]}
list_opts = {
page: params[:page]
}
if params[:topic_ids]
list_opts[:topic_ids] = params[:topic_ids].split(",").map(&:to_i)
end
# html format means we need to farm exclude from the site options
if params[:format].blank? || params[:format] == "html"