Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Heptagone's Profile

GitHub User: heptagone

Comments by Heptagone



I followed a railscast episode and got datatables up and running, beautifully along with the nice jquery-ui as in the front page.

The main issue I'm having though is that I suck at CoffeeScript/JS ~_~

I'm trying get the datatables to reload every 1 second but I don’t see any request coming into my webserver for refreshes and hence, no refreshes on the web page itself.

Here's my code:


jQuery ->
    sPaginationType: "full_numbers"
    bJQueryUI: true
    bProcessing: true
  setInterval('$("#comments_id").dataTable().fnDraw()', 1000);

And here is the code that gets generated on the client side:

(function() {

  jQuery(function() {
      sPaginationType: "full_numbers",
      bJQueryUI: true,
      bProcessing: true
    return setInterval('$("#comments_id").dataTable().fnDraw()', 1000);


Help will be appreciated. ^_^