1
我想在我的rails應用程序中使用footable,但我無法使用我的動態表數據實現分頁。footable分頁不能在動態數據上工作Rails
這裏是我的代碼
<table class="footable table table-stripped" data-page-size="10" data-filter=#filter>
<thead>
<tr>
<th>Organization Name</th>
<th>Type</th>
</tr>
</thead>
<tbody>
<%@organizations.each do |org|%>
<tr class="gradeX">
<td><%=org.name%></td>
<td><%=org.type%></td>
</tr>
<%end%>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<ul class="pagination pull-right">
<%=paginate @organizations%>
</ul>
</td>
</tr>
</tfoot>
</table>
<script type="text/javascript">
$(function() {
alert(); //testing
$('.footable').footable();
});
</script>
,但只顯示10條記錄,雖然它含有高達表45(最多顯示10條記錄,甚至改變數據頁大小)。
幫助我如果有人發現這個問題,Thaks提前。