我使用'jquery-datatables-rails','〜> 2.1.10.0.2'和ajax-datatables-rails.我已经成功地在我的项目中实现了两个用例,但在第三个我遇到了这个问题.
我的视图文件是:
<div class="container">
<div class="row">
<h3>My Books</h3>
<div class="column">
<div class="bs-docs-section">
<div class="col-lg-12">
<div class="bs-component">
<div class="table-responsive">
<table id="dataentriesDatatable" class="table table-striped table-hover table-bordered" data-source="<%= dataentries_path(format: :json) %>">
<thead class="theaderGray">
<tr>
<th>Edit Book</th>
<th>Name</th>
<th>Subject</th>
<th>Standard</th>
<th>Book Entry Status</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我的datatable js文件是:
var dtable = $('#dataentriesDatatable').dataTable({
"sDom": "<'row-fluid'<'span6'l><'span6'f>r>t<'row-fluid'<'span6'i><'span6'p>>",
"sPaginationType": "bootstrap",
"processing": true,
"serverSide": true,
"deferRender": true,
"bServerSide": true,
"ajax": $('#dataentriesDatatable').data('source'),
//"ajax": "../data/userarrays.txt",
"aoColumns": [
{ "bSortable": false },
{ "bSortable": …Run Code Online (Sandbox Code Playgroud)