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

9 lines
360 B
Plaintext

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