gryphon / simple_datatables

Simple Datatables.net integration for rails 3
MIT License
60 stars 40 forks source link

after data is retrieved the JS dies #11

Open drhenner opened 12 years ago

drhenner commented 12 years ago

This was my error.

Uncaught TypeError: Cannot read property 'length' of undefined Aajquery.dataTables.min.js:69 i.fn.dataTable.a.iDrawjquery.dataTables.min.js:68 jQuery.Callbacks.firejquery-1.7.1.js:1047 jQuery.Callbacks.self.fireWithjquery-1.7.1.js:1165 donejquery-1.7.1.js:7400 jQuery.ajaxTransport.send.callbackjquery-1.7.1.js:8181

You really should not use the minified JS. I would have debugged the issue but I'm unsure if I am going down a hole to never return.

malixsys commented 12 years ago

Check you layout value, it expects 'application'

      respond_with @elements, :layout => 'application'

if your /races/search.datatables? request does not reply with a json with s:Echo:1 in it, this might be your case...