Created
January 23, 2010 19:56
-
-
Save nanodeath/284762 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
%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!"} |
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
%p== Ah, I'm glad you're feeling #{@feeling}!...I think. |
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
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
haml :ask | |
end | |
post '/feeling' do | |
@feeling = params["feeling"] | |
haml :feeling | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is really helpful! :3