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

8 lines
313 B
Plaintext
Raw Normal View History

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