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

8 lines
316 B
Plaintext
Raw Normal View History

2014-12-19 13:34:24 -08:00
$('#questions').append('<% @questions.each do |a|
2014-12-19 14:03:03 -08:00
%><%= j render 'shared/question', a: a
2014-12-19 13:34:24 -08:00
%><% end %>');
<% if @questions.next_page %>
$('#pagination').html('<%= j will_paginate @questions, renderer: BootstrapPagination::Rails, page_links: false %>');
<% else %>
$('#pagination, #load-more-btn').remove();
<% end %>