def index
@search = Enrollment.search(params[:search])
@enrollments, @enrollments_count = @search.paginate(:page => params[:page], :per_page => 20), @search.count
end
Showing posts with label will-paginate. Show all posts
Showing posts with label will-paginate. Show all posts
Tuesday, August 4, 2009
Using Searchlogic and Will Paginate
Here's the code to in controller to integrate the searching with binarylogic-searchlogic gem and pagination using mislav-will_paginate gem.
Subscribe to:
Posts (Atom)