def index
@search = Enrollment.search(params[:search])
@enrollments, @enrollments_count = @search.paginate(:page => params[:page], :per_page => 20), @search.count
end
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:
Post Comments (Atom)
Blog Archive
-
▼
2009
(143)
-
▼
August
(20)
- Open previously closed tabs in Firefox
- Using Mutt to manage your Gmail
- Create & serve a Sinatra app on your iPhone
- Search and Replace in VIM
- Breaking Cucumber feature tests into separate smal...
- Calendar Date Select gem for Rails
- Reload current file in VIM
- Bluetooth tethering your iPhone to Ubuntu (works o...
- Common regular expresssions
- Cucumber > 0.3.7 freezes hash table and changes lo...
- Tech user groups, websites, events and calendars i...
- Shortcut key maps for Vim in normal mode
- Smarter visual highlight in VIM
- Implementing "google search" like search field usi...
- Avoid multi-level associations using named scope
- Table sort with Searchlogic
- Usefulness of named scope in remote console
- Using Searchlogic and Will Paginate
- Check size of folders in terminal
- Toggling between gnome terminal tabs
-
▼
August
(20)
No comments:
Post a Comment