Skip to content

Instantly share code, notes, and snippets.

@Syd
Created April 2, 2010 22:44
Show Gist options
  • Save Syd/353825 to your computer and use it in GitHub Desktop.
Save Syd/353825 to your computer and use it in GitHub Desktop.
require 'sinatra'
get '/' do
erb :index
end
put '/' do
"in put"
end
__END__
@@ index
<form method="post" action="/">
<input name="_method" value="put" type="hidden" />
<table>
<tr>
<td>Title:</td>
<td><input type="text" name="post[title]" id="post_title" value="title" /></td>
</tr>
<tr>
<td>Body:</td>
<td><textarea name="post[body]" rows="8" cols="40">body</textarea></td>
</tr>
<tr>
<td></td>
<td><input type="submit" /></td>
</tr>
</table>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment