Skip to content

Instantly share code, notes, and snippets.

@shouichi
Created March 14, 2013 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shouichi/5160578 to your computer and use it in GitHub Desktop.
Save shouichi/5160578 to your computer and use it in GitHub Desktop.
class PagesController < ApplicationController
def async
EM.defer do
env['async.callback'].call [200, {}, ['Hello from callback.']]
end
throw :async
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment