mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 16:56:10 +01:00
Changed UsersController#index to use will_paginate plugin instead of classic_pagination
Made corresponding change in view. Added User.per_page method to provide number of users per page to User.paginate button. I can remove and just pass the param to the method in the controller if that is more desirable. Added 2 controller tests for pagination. No view tests have been added.
This commit is contained in:
parent
2f1b15fed3
commit
ed76cf55d2
4 changed files with 20 additions and 3 deletions
|
|
@ -29,8 +29,7 @@
|
|||
<% end %>
|
||||
</table>
|
||||
<p>
|
||||
<%= link_to "« Previous page", { :page => @user_pages.current.previous } if @user_pages.current.previous %>
|
||||
<%= link_to "Next page »", { :page => @user_pages.current.next } if @user_pages.current.next %>
|
||||
<%= will_paginate @users %>
|
||||
</p>
|
||||
|
||||
<p><%= link_to 'Signup new user', signup_path %></p>
|
||||
Loading…
Add table
Add a link
Reference in a new issue