1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# VIEW ================================
# index.html.erb
<table>
  <thead>
    <tr>
      <th>Login</th>
    </tr>
  </thead>
  <tbody id="table_body">
    <%= render :partial => 'user_list' %>
  </tbody>
</table>
<%= javascript_tag "var ep = EndlessPage(#{@users.page_count}, '#{users_path}', encodeURIComponent('#{form_authenticity_token}'));" %>

# _user_list.erb
<% @users.each do |user| -%>
  <tr id="<%= dom_id(user)%>">
    <td><%=h user.login %></td>
  </tr>
<% end -%>