retrospring/app/views/user/show_follow.js.erb
2015-07-24 17:14:42 +02:00

8 lines
360 B
Text

$('#users').append('<% @users.each do |user|
%><div class="col-md-4 col-sm-6 col-xs-12"><%= j render 'shared/userbox', user: user
%></div><% end %>');
<% if @users.next_page %>
$('#pagination').html('<%= j will_paginate @users, renderer: BootstrapPagination::Rails, page_links: false %>');
<% else %>
$('#pagination, #load-more-btn').remove();
<% end %>