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

9 lines
341 B
Plaintext

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