Skip to content
Extraits de code Groupes Projets
Valider 88c83bb0 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

MS added pagination to the author show page

parent 47f5c77e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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!
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter