Skip to content

Instantly share code, notes, and snippets.

@nanodeath
Created January 23, 2010 19:56
Show Gist options
  • Save nanodeath/284762 to your computer and use it in GitHub Desktop.
Save nanodeath/284762 to your computer and use it in GitHub Desktop.
%h1 Feeling Friendly
%form{:action => "/feeling", :method => "post"}
%legend
A simple question
%p
%label{:for => ""} How are you feeling today?
%input{:type => "textbox", :name => "feeling", :id => "feeling"}
%p
%input{:type => "submit", :value => "Submit!"}
%p== Ah, I'm glad you're feeling #{@feeling}!...I think.
require 'rubygems'
require 'sinatra'
get '/' do
haml :ask
end
post '/feeling' do
@feeling = params["feeling"]
haml :feeling
end
@usure
Copy link

usure commented Mar 21, 2013

This is really helpful! :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment