diff --git a/CHANGES.markdown b/CHANGES.markdown index 5ebb1d6..678c78f 100644 --- a/CHANGES.markdown +++ b/CHANGES.markdown @@ -5,6 +5,10 @@ * Values can be added to the context at the beginning of the execution flow using the :initialize-context action. +## Bugs fixed + +* Support multimethods as decision functions. + # New in 0.13 * Optionally a value can be specified for ring-response diff --git a/src/liberator/core.clj b/src/liberator/core.clj index 8a847cb..05237f5 100644 --- a/src/liberator/core.clj +++ b/src/liberator/core.clj @@ -71,9 +71,8 @@ (declare handle-exception) (defn decide [name test then else {:keys [resource request] :as context}] - (if (or (fn? test) - (instance? clojure.lang.MultiFn test) - (contains? resource name)) + (if (or test + (contains? resource name)) (try (let [ftest (or (resource name) test) ftest (make-function ftest)