I currently have a users page which displays all the reviews that user has written. Each review is displayed as a partial (named _profile) and they are all shown on a page of an accordian. How can I add pagination to these review partials?
users show page
<div class="profile_reviews_container">
<div id="accordion">
<h3><a href="#">Reviews written</a></h3>
<div class="profile_reviews_cont">
<% @user.reviews.each do |review| %>
<%= render "reviews/profile", :profile => review %>
<% end %>
</div>
<h3><a href="#">Favourites</a></h3>
<div>
</div>
</div>
</div>
Which controller do I add the .paginate call to and will the view contain <%= will_paginate @reviews %>
or <%= will_paginate @profiles %>
?
Thanks for any help its much appreciated!