retrospring/app/views/user/questions.js.erb
2020-04-20 23:13:24 +02:00

8 lines
360 B
Text

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