I’m using Kaminari for pagination.
Using the following lines in my controller:
@public_items =Array.new
@items= Item.all
@items.each do |item|
if (item.is_public)
@public_items <<item
end
end
@public_items = Kaminari.paginate_array(@public_items).page(params[:page]).per(4)
and this line in my view
<%paginate @public_items %>
<% @public_items.each do |item| %>
.....
<%end%>
The pagination works fine meaning i can navigate to different pages by going to items?page=2 for example but the page navigation menu () doesn’t show up!
and <%paginate @public_items %> does not create any html code
Shouldn’t it be:
Including the equals sign. Without the equals sign it hides it.