Skip to content

Instantly share code, notes, and snippets.

@wfaler
Created January 18, 2011 00:19
Show Gist options
  • Save wfaler/783768 to your computer and use it in GitHub Desktop.
Save wfaler/783768 to your computer and use it in GitHub Desktop.
post.scala
class MyController extends Controller with ParameterMapper{
post("/widgets/:id")((request, response) => {
mapRequest[Widget](request)(widget => {
// update the widget
Widgets.update(widget)
response.sendRedirect("/widgets")
})
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment