Guest User

Untitled

a guest
Nov 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. def submit(id: PostId) = Action { implicit request =>
  2. postContentForm.bindFromRequest.fold(
  3. formWithErrors => BadRequest(views.html.posts.edit(id, formWithErrors)),
  4. postContent => {
  5. commit(PostEdited(id, postContent))
  6. Redirect(routes.PostsController.show(id)).flashing("info" -> "Post saved.")
  7. })
  8. }
Add Comment
Please, Sign In to add comment