pagination on the history page

This commit is contained in:
rick
2010-08-12 09:38:28 -07:00
parent b118436fa9
commit 45de814154
3 changed files with 37 additions and 12 deletions
+5 -3
View File
@@ -80,9 +80,11 @@ module Precious
end
get '/history/:name' do
@name = params[:name]
wiki = Gollum::Wiki.new($path)
@page = wiki.page(@name)
@name = params[:name]
wiki = Gollum::Wiki.new($path)
@page = wiki.page(@name)
@page_num = [params[:page].to_i, 1].max
@versions = @page.versions :page => @page_num
mustache :history
end