retrospring/app/views/question/show.js.erb
2015-01-03 19:24:51 +01:00

8 lines
No EOL
345 B
Text

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