       (let [^Handler handler (-> (mapv handlers/adapter (rest handlers-and-path))
                                  (Handlers/chain))]
         (case method
-          :any (.prefix chain path (helpers/action #(.all % handler)))
-          :all (.prefix chain path (helpers/action #(.all % handler)))
+          :any (.prefix chain path (ch/fn->action #(.all % handler)))
+          :all (.prefix chain path (ch/fn->action #(.all % handler)))
           :get (.get chain path handler)
           :post (.post chain path handler)
           :put (.put chain path handler)


(defmethod attach-route :assets
  [^Chain chain [_ ^String path {:keys [dir indexes]}]]
  (.files chain (helpers/action
                 (fn [^FileHandlerSpec spec]
                   (.path spec path)
                   (when indexes (.indexFiles spec (into-array String indexes)))

(ns catacumba.impl.routing
  (:require [catacumba.impl.handlers :as handlers]
            [catacumba.impl.context :as ctx]
            [catacumba.impl.helpers :as ch])
  (:import ratpack.handling.Context
           ratpack.handling.Chain
           ratpack.handling.Handlers
