title: rails 3.2 and datatable example
body: <p>Trying to do a simple datatables implementation with my rails 3.2 app.  I have this exact app working in PHP and wanted to port it to ruby.  I am not a Ruby expert just learning it.</p>
  
  <p>I am basically following this example but with my Code and DB</p>
  
  <p><a href="http://asciicasts.com/episodes/340-datatables" rel="nofollow">http://asciicasts.com/episodes/340-datatables</a></p>
  
  <ul>
  <li><p>I created my table and gave it a class and ID</p></li>
  <li><p>I added this file -> /app/assets/javascripts/products.js.coffee   which contains </p>
  
  <p>jQuery ->
    $('#run-table').dataTable</p>
  
  <pre><code>  sPaginationType: "full_numbers"
    bServerSide: true
    iDisplayLength: 4
    aaSorting:[]
  </code></pre></li>
  </ul>
  
  <p>What I see on my web page is a properly formatted table with columns, sort icons, search filter text box, pagination numbers all correct. But it does not work.  </p>
  
  <p>If I do "bServerSide: true"  Then any time I interact with the table I get </p>
  
  <pre><code>"NetworkError: 404 Not Found  - http://localhost:3000/null?sEcho=1&amp;iColumns=11&amp;sColumns=&amp;iDisplayStart=0&amp;iDisplayLength=4&amp;...
  </code></pre>
  
  <p>So if I sort or add a search filter I get that error.</p>
  
  <p>If I change it to "bServerSide: false"  Then I get a correct looking table that load with my initial data but does nothing.  No sorting, no filter, no pagination. </p>
  
  <p>The part from that sample code I did not do was -> /app/datatables/products_datatable.rb   because I did not see a need for it.  With PHP I dont use server side and its about 4 lines of code to get this working.  </p>
  
  <p>Any help would be great I can provide more code snippets if needed</p>