Преглед изворни кода

Revert "Doesn't require a function declaration for the predicate"

This reverts commit a4dabeee7c7d08fe20b5f895b7adc2312ffb1367.
Christopher Hunt пре 12 година
родитељ
комит
4488b1e8e1
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      play-scala/app/utils/PredicatedAction.scala

+ 1 - 1
play-scala/app/utils/PredicatedAction.scala

@@ -7,7 +7,7 @@ import play.api.mvc._
  * condition is not satisfied then a supplied status result is yielded.
  */
 class PredicatedActionBuilder {
-  def apply[A](p: Boolean, failed: Result)(action: Action[A]): Action[A] = new Action[A] {
+  def apply[A](p: => Boolean, failed: Result)(action: Action[A]): Action[A] = new Action[A] {
     def apply(request: Request[A]): Result = {
       if (p) action(request) else failed
     }