Permalink
Browse files

Route paths can be evaluated lists again

  • Loading branch information...
1 parent c6f9589 commit ce64975c8b0b88e6cdbda7d3cf3f4433c222f980 @weavejester committed Mar 28, 2010
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/compojure/core.clj
View
@@ -25,12 +25,11 @@
(defn- prepare-route
"Pre-compile the route."
[route]
- (cond
- (string? route)
- (route-compile route)
- (seq? route)
- (route-compile (first route) (apply hash-map (rest route)))
- :else route))
+ (if (string? route)
+ (route-compile route)
+ `(if (string? ~route)
+ (route-compile ~route)
+ ~route)))
(defn- assoc-route-params
"Associate route parameters with the request map."

0 comments on commit ce64975

Please sign in to comment.