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

      (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)))
          :get (.get chain path handler)
          :post (.post chain path handler)
          :put (.put chain path handler)

(defmethod attach-route :prefix
  [^Chain chain [_ ^String path & handlers]]
  (let [callback #(reduce attach-route % handlers)]
    (.prefix chain path ^Action (ch/fn->action callback))))

(defmethod attach-route :scope
  [^Chain chain [_ & handlers]]
  (let [callback #(reduce attach-route % handlers)]
    (.insert chain ^Action (ch/fn->action callback))))

(defmethod attach-route :by-method
  [^Chain chain [_ handlersmap]]
  {:pre [(map? handlersmap)]}
  (letfn [(attach [^Context ctx ^ByMethodSpec spec [method handler]]
            (let [^Handler handler (handlers/adapter handler)
                  ^Block block (ch/fn->block #(.handle handler ctx))]
              (case method
                :get (.get spec block)
                :post (.post spec block)
