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

8 lines
341 B
Text

$('#answers').append('<% @answers.each do |a|
%><%= j render 'answerbox', a: a
%><% 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 %>