Skip to content

Instantly share code, notes, and snippets.

@sarveshseri
Created October 8, 2012 10:07
Show Gist options
  • Save sarveshseri/3851793 to your computer and use it in GitHub Desktop.
Save sarveshseri/3851793 to your computer and use it in GitHub Desktop.
Play Gotcha's
package controllers.auth
import play.api._
import play.api.mvc._
import play.api.data._
import views._
object AuthController extends Controller {
/**
* Dummy login page.
*/
def login = Action { implicit request =>
Ok(html.auth.login())
}
/**
* Redirect to Application.index()
*/
def redirectToIndex = Action { implicit request =>
Redirect(controllers.routes.Application.index)
}
/**
* Redirect to login()
*/
def redirectToLogin = Action { implicit request =>
Redirect(controllers.auth.routes.AuthController.index)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment