I use the pearl jquery-datatables-rails with bootstrap (gem) and it is beautiful. The episode railscast on it is wonderful - but do not put the gem in your asset group or it will not work when deployed to heroku (since the asset group is not used in production).
Put this line in your gemfile:
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'
and run:
bundle install
Also, be sure to put this line in application.rb:
config.assets.initialize_on_precompile = false
Add this to your application.js
//= require dataTables/jquery.dataTables
And this if you use the download:
//= require dataTables/jquery.dataTables.bootstrap
Add this to your application.css:
*= require dataTables/jquery.dataTables
Or this if you use download:
*= require dataTables/jquery.dataTables.bootstrap
And if you use bootstrap, add this to your js.coffee file for your controller, you use datatables in:
If you use liquid containers:
#// For fluid containers $('#dashboard').dataTable({ "sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>", "sPaginationType": "bootstrap" });
If you use containers with a fixed width:
#// For fixed width containers $('.datatable').dataTable({ "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>", "sPaginationType": "bootstrap" });