added popular exploration, added order:rank

This commit is contained in:
albert
2011-08-11 15:39:51 -04:00
parent bd51079fc1
commit e42ea9c608
25 changed files with 296 additions and 61 deletions

View File

@@ -0,0 +1,34 @@
module PostSetPresenters
class Popular < Base
attr_accessor :post_set, :tag_set_presenter
delegate :posts, :date, :to => :post_set
def initialize(post_set)
@post_set = post_set
end
def prev_day
date - 1
end
def next_day
date + 1
end
def prev_week
date - 7
end
def next_week
date + 7
end
def prev_month
1.month.ago(date)
end
def next_month
1.month.since(date)
end
end
end