MS added pagination to the author show page

This commit is contained in:
maxwell 2010-07-26 15:15:42 -07:00
parent 47f5c77e1a
commit 88c83bb028
2 changed files with 2 additions and 1 deletions

View file

@ -3,7 +3,7 @@ class AuthorsController < ApplicationController
def show
@author= Author.where(:id => params[:id]).first
@author_ostatus_posts = @author.ostatus_posts.sort(:created_at.desc)
@author_ostatus_posts = @author.ostatus_posts.paginate :page => params[:page], :order => 'created_at DESC'
end

View file

@ -8,5 +8,6 @@
%ul#stream
- for post in @author_ostatus_posts
= render type_partial(post), :post => post
= will_paginate @author_ostatus_posts
- else
%h3 no posts to display!