Permalink
Browse files

Adding pagination to index action

  • Loading branch information...
1 parent 3d7a90b commit 8386d419f0e88eac6545b44675aad46ac1610cb1 @pat pat committed Sep 29, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/contacts_controller.rb
@@ -2,7 +2,7 @@ class ContactsController < ApplicationController
# GET /contacts
# GET /contacts.xml
def index
- @contacts = Contact.find(:all)
+ @contacts = Contact.paginate :page => (params[:page] || 1)
respond_to do |format|
format.html # index.html.erb

0 comments on commit 8386d41

Please sign in to comment.