Created
April 17, 2013 00:59
-
-
Save RickCarlino/5400949 to your computer and use it in GitHub Desktop.
A gist for my buddy Josh, who is learning the wonderful SinatraRB
This file contains 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 'sinatra' | |
require 'shotgun' | |
get '/' do | |
# Did you put this in the '/views/' directory?? | |
erb :form | |
end | |
post '/form' do | |
lines = params[:message] | |
"Whoah. Ruby totally got your input data (#{params[:message]}). You can treat params[:message] like any other string variable in Ruby. Try it out." | |
#Start over here. Don't copy and paste. Learn how to do each of those operations yourself using Google and your text book. | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't know why I didn't either use or delete line 10. Whatever. Do you get the main idea here?