Rails Datatables with Ajax not working with Turbolink -
Then I have a new Rail 4 app using the foundation and today I started integrating the DataTable and set it After doing a little shock. Page by using AJAX calls
When I click on a link from a page (home at this instance), which sends me to a page that includes data, tables without entries or searches Points on the box or page. However, if I refresh my browser, the page will be fully refreshed and Ajax is called and the table populates properly.
After looking at the network traffic, I see that the reaction is 304 after clicking on the link: not modified. None of the other requests for JS and CSS and etc., I'm assuming that JS does not reload and does not have the appropriate ('# operation)'. Call DataTable ({...})
Also, one thing is that the table is located within a partial 'tasks_index.html .haml'.
One thing I was missing was that I was still using the TurboLines gem. I tried to disable it to see if my problem would be fixed and surprisingly enough.
So what would be the reason for loading normal javascript to load on the turbochink page? Is there any way to force turbo-bound always to load some pages? Am i not using turbo linux?
I think you are using $ (document)). To initialize Datatables already,
events. If you click on a link while using TurboLinks, this event will not fire because you can load the TurboLyx page manually, instead you should use the Document page: Change
event instead. Check here:
Comments
Post a Comment