Permalink
Browse files

renamed `link-to' -> `url-for'.

  • Loading branch information...
1 parent ec98d5a commit 90563cc21bc3f0d7408fecdcfc3cb90a3fe701eb @fukamachi committed Jun 16, 2011
Showing with 7 additions and 7 deletions.
  1. +5 −5 src/util/route.lisp
  2. +2 −2 t/util/route.lisp
View
10 src/util/route.lisp
@@ -140,11 +140,11 @@ Example:
`(:captures ,(coerce values 'list)))))))
@export
-(defmethod link-to ((this <url-rule>) params)
+(defmethod url-for ((this <url-rule>) params)
"Return an URL from a rule and parameters.
Example:
- (link-to (make-url-rule \"/hello/:name\")
+ (url-for (make-url-rule \"/hello/:name\")
'(:name \"fukamachi\"))
;=> \"/hello/fukamachi\"
"
@@ -159,11 +159,11 @@ Example:
params))
@export
-(defmethod link-to ((this <regex-url-rule>) params)
+(defmethod url-for ((this <regex-url-rule>) params)
"Return an URL from a rule and parameters.
Example:
- (link-to (make-url-rule \"/hello/:name\")
+ (url-for (make-url-rule \"/hello/:name\")
'(:name \"fukamachi\"))
;=> \"/hello/fukamachi\"
"
@@ -185,7 +185,7 @@ Clack.Util.Route - Class for Sinatra-compatible URL rule.
(match *url-rule* \"/bye/fukamachi\")
;=> NIL
- (link-to *url-rule* '(:name \"fukamachi\"))
+ (url-for *url-rule* '(:name \"fukamachi\"))
;=> \"/hello/fukamachi\"
"
View
4 t/util/route.lisp
@@ -19,12 +19,12 @@
(%is-match rule req-url params comment)))
(defun is-link (url-rule params result &optional comment)
- (is (link-to (make-url-rule url-rule) params)
+ (is (url-for (make-url-rule url-rule) params)
result
comment))
(defun is-re-link (url-rule params result &optional comment)
- (is (link-to (make-url-rule url-rule :regexp t) params)
+ (is (url-for (make-url-rule url-rule :regexp t) params)
result
comment))

0 comments on commit 90563cc

Please sign in to comment.