I added this gem
gem 'jquery-datatables-rails', github: "rweng/jquery-datatables-rails", branch: "master"
and then updated my application.js and application.css with
//= require dataTables/jquery.dataTables
*= require dataTables/jquery.dataTables
Now in my products.js.coffee file
table = jQuery ->
$("#products").DataTable()
new jQuery.fn.dataTable.Buttons( table, {
buttons: [
'copy', 'excel', 'pdf'
]
})
table.buttons().container()
.appendTo( $('#exportButtons', table.table().container() ) )
and I'm getting the error
TypeError: c is undefined
I'm stuck and don't have any idea where is the problem. Is this datatable gem does not support the latest release of datatables export buttons