Retrospring/app/views/inbox/show.js.erb

8 lines
315 B
Plaintext
Raw Normal View History

2015-02-12 12:59:46 -08:00
$('#timeline').append('<% @timeline.each do |answer|
%><%= j render 'inbox/entry', a: answer
%><% end %>');
<% if @timeline.next_page %>
$('#pagination').html('<%= j will_paginate @inbox, renderer: BootstrapPagination::Rails, page_links: false %>');
<% else %>
$('#pagination, #load-more-btn').remove();
<% end %>