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:
MHarris 2008-07-14 13:10:55 -04:00
parent 2f1b15fed3
commit ed76cf55d2
4 changed files with 20 additions and 3 deletions

View file

@ -16,7 +16,7 @@ class UsersController < ApplicationController
respond_to do |format|
format.html do
@page_title = "TRACKS::Manage Users"
@user_pages, @users = paginate :users, :order => 'login ASC', :per_page => 10
@users = User.paginate :page => params[:page], :order => 'login ASC'
@total_users = User.count
# When we call users/signup from the admin page
# we store the URL so that we get returned here when signup is successful