Skip to content

Instantly share code, notes, and snippets.

@cmaujean
Forked from anonymous/gist:2920469
Created June 12, 2012 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmaujean/2920532 to your computer and use it in GitHub Desktop.
Save cmaujean/2920532 to your computer and use it in GitHub Desktop.
require 'sinatra'
get '/process' do
erb :process
end
post '/process' do
# whatever with params[:name_input_username]
...
...
erb :final
end
<!-- found in views/final.html.erb -->
<h1>Blah blah blah <%= some_var %></h1>
<h2>Blah blah blah</h2>
<!-- found in views/process.html.erb -->
<form method="post" action="/process">
Username:<input type="text" id="id_input_username" name="name_input_username" /><br/>
<input type="submit" name="Submit"/>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment