Skip to content

Commit

Permalink
few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sadache committed Aug 1, 2012
1 parent 82fb6f4 commit b028c18
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
18 changes: 10 additions & 8 deletions framework/src/play/src/main/scala/play/api/mvc/Action.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ class HandlerRef[T](callValue: => T, handlerDef: play.core.Router.HandlerDef)(im

}

trait EssentialAction extends (RequestHeader => Iteratee[Array[Byte],Result]) with Handler
trait EssentialAction extends (RequestHeader => Iteratee[Array[Byte],Result]) with Handler {

/**
* Returns itself, for better support in the routes file.
*
* @return itself
*/
def apply() = this

}

/**
* An action is essentially a (Request[A] => Result) function that
Expand Down Expand Up @@ -88,13 +97,6 @@ trait Action[A] extends EssentialAction {

}

/**
* Returns itself, for better support in the routes file.
*
* @return itself
*/
def apply() = this

override def toString = {
"Action(parser=" + parser + ")"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,10 @@ object Router {

object Route {

def apply(method: String, pathPattern: PathPattern) = new {
trait ParamsExtractor {
def unapply(request: RequestHeader): Option[RouteParams]
}
def apply(method: String, pathPattern: PathPattern) = new ParamsExtractor{

def unapply(request: RequestHeader): Option[RouteParams] = {
if (method == request.method) {
Expand Down

0 comments on commit b028c18

Please sign in to comment.