Skip to content

Instantly share code, notes, and snippets.

@marcoroman89
Created July 25, 2013 04:26
Show Gist options
  • Save marcoroman89/6076897 to your computer and use it in GitHub Desktop.
Save marcoroman89/6076897 to your computer and use it in GitHub Desktop.
Redirect
get '/' do
if session[:player_name]
redirect '/welcome'
else
redirect '/game'
end
end
get '/welcome' do
erb :welcome
end
get '/' do
if session[:player_name]
redirect '/game'
else
redirect '/new_player'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment