noir-clojure / lib-noir

A set of libraries for ring apps, including stateful sessions.
Eclipse Public License 1.0
483 stars 47 forks source link

Add utility function related anti forgery #114

Closed ayato-p closed 9 years ago

ayato-p commented 9 years ago

Just add an function that about helper function for HTML form.

WHY: This library depends on ring/ring-anti-forgery implicitly (because using ring/ring-defaults). It's a enable by default. User need add the few dependencies at a controller file, like this.

(use 'ring.util.anti-forgery)

(form-to [:post "/something"] (anti-forgery-field)

That's a little bit strange for me. Because I didn't added the ring/ring-anti-forgery library explicitly. So, I just want to write this

(use 'noir.util.anti-forgery)

(form-to [:post "/something"] (anti-forgery-field)

That's why I added an function as a helper function for HTML form.

yogthos commented 9 years ago

looks great

yogthos commented 9 years ago

just pushed out a new version 0.9.9 to Clojars with the change

ayato-p commented 9 years ago

Thank you :)