MS added pagination to the author show page
This commit is contained in:
parent
47f5c77e1a
commit
88c83bb028
2 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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!
|
||||
|
|
|
|||
Loading…
Reference in a new issue