class Thoth::ArchiveController
Public Instance Methods
index(page = 1)
click to toggle source
# File lib/thoth/controller/archive.rb, line 36 def index(page = 1) page = page.to_i error_404 unless page >= 1 @posts = Post.recent(page, 10) error_404 if page > @posts.page_count && @posts.page_count > 0 @title = "#{Config.site['name']} Archives (page #{page} of " << "#{@posts.page_count > 0 ? @posts.page_count : 1})" @pager = pager(@posts) end