Datatables ruby on rails integrations

Datatables ruby on rails integrations

obedlorissonobedlorisson Posts: 2Questions: 1Answers: 0

i'm having some errors when i try to integrate datatable with a rails applications.
i upload datatables assets to my app, in order to have them available in the assets pipeline
i initialize the it with

$(document).ready( function () {
    $('#table_id').DataTable();
} );

but nothing happen
in the console there's an error
Uncaught TypeError: Cannot read property 'defaults' of undefined
any pointers will be appreciated.

Answers

  • obedlorissonobedlorisson Posts: 2Questions: 1Answers: 0

    finally fix it.
    the datatable assets has to be loaded right after jquery require statement in the application.js

This discussion has been closed.