sjl/red-tape — pull request #1 by johnswanson (2013-08-18 05:19:41+00:00)
Title: allow anonymous form-cleaner functions

Saw your post on HN and wanted to give this a try--looks great, I'm enjoying it!

One problem I ran into:

(defform foo
:bar []
:red-tape/form (fn [form-data] form-data))

failed to pass the sanity check--I got `Assert failed: Form-level cleaners must be a function, vector, or set; got (fn [] form-data)`

To avoid this, instead of trying to make a sanity judgment based on the form `'(fn [form-data] form-data)` itself, I `eval`ed it and ensured that its type was valid. Let me know if you see a better way!

-John