jquery-datatables-rails
jquery-datatables-rails copied to clipboard
Table in the index page is empty when first rendering.
The table gets populated only after a page refresh is executed. Everything else works. I am following the Rails Cast #340.
Not sure if this is a bug, or I am missing something here. My entire code is here: https://github.com/levi-l-damian/test-dt-mg
If am navigating away form the index page when I am coming back the page is again empty. If I am executing the browser page request, I am getting the table content correctly rendered in the page.


@levi-l-damian Are you using turbolinks
. I was facing same issue.When I was hitting a link event was not getting bind and the simple solution was to bind datatable on page load and ready like below.
$(document).on "page:load ready", ->
datatable_bindings() //This functions initializes my datatable
Hope this helps.
It helps, thanks, Levi.