Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def submit(id: PostId) = Action { implicit request =>
- postContentForm.bindFromRequest.fold(
- formWithErrors => BadRequest(views.html.posts.edit(id, formWithErrors)),
- postContent => {
- commit(PostEdited(id, postContent))
- Redirect(routes.PostsController.show(id)).flashing("info" -> "Post saved.")
- })
- }
Add Comment
Please, Sign In to add comment