Since I give up adding DataTables 1.10.8 using Rails-assets or Bower in my Rails 4 project, I added the component directly in /vendor/assets/DataTables
directory and edited in application.js:
//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require select2
//= require datatables // This
//= require turbolinks
//= require_tree .
and application.css.scss
*= require_self
*= require select2
*= require datatables // This
*= require_tree .
*/
To test that DataTables I just enter to one my forms and with the Chrome console, I set a bootstrap class to a table, and converted to a DataTable with this:
$('table').DataTable( {
dom: 'B<"clear">lfrtip',
buttons: {
name: 'primary',
buttons: [ 'copy', 'csv', 'excel' ]
}
} );
Apparently it works, but there's something missing, those tiny icons in the sort headers.
Note: I included a customized download from the DataTables website.
Update:
Apparently I have a problem with the glyphicons, some font is missing or something. I'm currently using the gem 'bootstrap-sass', '~> 3.3.5'