Retrospring/app/views/group/index.js.erb

8 lines
327 B
Plaintext
Raw Normal View History

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