Skip to content

Instantly share code, notes, and snippets.

@tobias
Created December 18, 2008 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tobias/37497 to your computer and use it in GitHub Desktop.
Save tobias/37497 to your computer and use it in GitHub Desktop.
get '/' do
haml :index
end
post '/unwind' do
@url, @unwound_url, @unwind_error = unwind(params[:url])
haml :index
end
get '/unwind.json' do
content_type 'application/json'
@url, @unwound_url, @unwind_error = unwind(params[:url])
{ :from_url => @url, :to_url => @unwound_url, :error => @unwind_error }.to_json
end
get '/stylesheets/style.css' do
content_type 'text/css'
sass :style
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment