This commit is contained in:
albert
2011-07-09 03:32:18 -04:00
parent 085995126c
commit a16dfdf0dd
14 changed files with 75 additions and 48 deletions

View File

@@ -16,7 +16,7 @@ module PostSets
end
def offset
([page.to_i, 1].max - 1) * limit
(current_page - 1) * limit
end
def limit
@@ -40,7 +40,7 @@ module PostSets
end
def current_page
(offset.to_f / pool.post_count).floor
[page.to_i, 1].max
end
end
end