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

9 lines
360 B
Plaintext

$('#questions').append('<% @questions.each do |q|
%><%= j render 'shared/question', q: q, type: nil
%><% end %>');
<% if @more_data_available %>
$('#pagination').html('<%= j render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @questions_last_id %>');
<% else %>
$('#pagination, #load-more-btn').remove();
<% end %>