RailsCasts Pro episodes are now free!

Learn more or hide this

tancoder's Profile

GitHub User: tancoder

Comments by


thanks @Bardwin for sharing! This works great but I want to hide the pagination on every page vs just the very last page and simply have the "Show more products" button on each page. Any ideas on how to accomplish that?

Currently my index.js.erb is below

$('#items').append('<%= j render('items') %>');
<% if @items.next_page %>
$('.pagination').replaceWith('<%= j will_paginate(@items) %>');
<% else %>
<% end %>
<% sleep 1 %>

Thanks again.