Skip to content

Instantly share code, notes, and snippets.

@RickCarlino
Created April 17, 2013 00:59
Show Gist options
  • Save RickCarlino/5400949 to your computer and use it in GitHub Desktop.
Save RickCarlino/5400949 to your computer and use it in GitHub Desktop.
A gist for my buddy Josh, who is learning the wonderful SinatraRB
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
@RickCarlino
Copy link
Author

I don't know why I didn't either use or delete line 10. Whatever. Do you get the main idea here?

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