retrospring/app/views/question/show.js.erb
2020-04-26 17:13:31 +02:00

8 lines
373 B
Text

$('#answers').append('<% @answers.each do |answer|
%><%= j render 'answerbox', a: answer, show_question: false
%><% end %>');
<% if @more_data_available %>
$('#pagination').html('<%= j render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @answers_last_id %>');
<% else %>
$('#pagination, #load-more-btn').remove();
<% end %>