fixed post listing

This commit is contained in:
albert
2011-06-21 13:10:01 -04:00
parent 07f8dba7f2
commit fab37bc0d3
8 changed files with 80 additions and 56 deletions

View File

@@ -11,11 +11,11 @@ module PaginationHelper
html = "<menu>"
unless records.is_first_page?
html << '<li>' + link_to("&laquo; Previous", params.merge(:after_id => records.first_id)) + '</li>'
html << '<li>' + link_to("&laquo; Previous", params.merge(:page => "b#{records.first_id}")) + '</li>'
end
unless records.is_last_page?
html << '<li>' + link_to("Next &raquo;", params.merge(:before_id => records.last_id)) + '</li>'
html << '<li>' + link_to("Next &raquo;", params.merge(:page => "a#{records.last_id}")) + '</li>'
end
html << "</menu>"