Hi, I'm new to rails and I want to know about paginate method in rails. How can I do pagination in rails. Thanks
+2
A:
Take a look at the http://github.com/mislav/will_paginate (gem/plugin)
cloverink
2010-10-15 11:42:18
see more http://railscasts.com/episodes/51-will-paginate
cloverink
2010-10-15 11:43:52
This is my controller's index action where I am trying to list all pages using paginate. @pages = Page.paginate :page => params[:page] But I got an error "undefined method `paginate "
2010-10-15 11:48:35
Did you install this plugin ?
cloverink
2010-10-15 11:56:11
Have you got at the bottom of your environment.rb file the line:require 'will_paginate'
cloverink
2010-10-15 11:57:57
@cloverink You don't need to require it if you use the Rails gem dependency system.
Simone Carletti
2010-10-15 12:03:39