Created
January 18, 2011 00:19
-
-
Save wfaler/783768 to your computer and use it in GitHub Desktop.
post.scala
This file contains hidden or 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
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