retrospring/app/views/static/index.js.erb
2014-12-08 14:22:11 +01:00

8 lines
No EOL
327 B
Text

$('#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 %>