Skip to content

Instantly share code, notes, and snippets.

@buhrmi
Created December 30, 2011 23:50
Show Gist options
  • Save buhrmi/1542099 to your computer and use it in GitHub Desktop.
Save buhrmi/1542099 to your computer and use it in GitHub Desktop.
class App < Sinatra::Base
include Jazzband
get '/' do
session['username'] = params['username']
haml session['username'] ? :chat : :select_username
end
get '/send' do
return 403 unless session['username']
push_rbjs do
jQuery('#messages').append haml :message
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment