(use 'compojure)
; surprise: *errors* appear unbound!
(binding [*errors* {:foo "bar"}] ((error-class text-field) :foo))
= > [:input {:type "text", :name "foo", :id "foo"}]
; correct binding (different var!)
(binding [compojure.validation/*errors* {:foo "bar"}] ((error-class
text-field) :foo))
=> [:div.error [:input {:type "text", :name "foo", :id "foo"}]]
This is logical, given how immigrate works, but it still feels weird--
and it forces you to poke around in the "real" namespaces sometimes.
Is this a feature or a bug?
Stu