Simplify PAGE-URL's around method.

This commit is contained in:
Brit Butler 2014-05-28 11:50:44 -04:00
parent 70427b81d0
commit 669655930b

View file

@ -35,10 +35,9 @@
(error "No routing method found for: ~A" class-name))))) (error "No routing method found for: ~A" class-name)))))
(defmethod page-url :around ((document t)) (defmethod page-url :around ((document t))
(let ((result (call-next-method))) (let* ((result (call-next-method))
(if (pathname-type result) (type (or (pathname-type result) "html")))
(make-pathname :defaults result) (make-pathname :type type :defaults result)))
(make-pathname :type "html" :defaults result))))
(defgeneric render (document &key &allow-other-keys) (defgeneric render (document &key &allow-other-keys)
(:documentation "Render the given DOCUMENT to HTML.")) (:documentation "Render the given DOCUMENT to HTML."))