Created
December 30, 2011 23:50
-
-
Save buhrmi/1542099 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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