Created
February 20, 2013 01:50
-
-
Save zidarsk8/4992029 to your computer and use it in GitHub Desktop.
i am a bad bad person
This file contains 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
def remove(id: String) = Action { implicit request => | |
// user match { | |
// case Some(u) => { | |
// Users.remove(id) | |
// Redirect(routes.Application.index()).flashing("message" -> "User Deleted!") | |
// } | |
// case None => { | |
// Redirect(routes.Application.index()).flashing("message" -> "You can't do that! You're a bad perosn") | |
// } | |
// } | |
// Do not look down! | |
Redirect(routes.Application.index()).flashing(user match { | |
case Some(u) => { | |
Users.remove(id) | |
("message" -> "User Deleted!") | |
} | |
case None => { | |
("message" -> "You can't do that! You're a bad perosn") | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment