noir-clojure / lib-noir

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

Few fixes in restricted macro. #26

Closed edtsech closed 11 years ago

edtsech commented 11 years ago

Hey As I understand

(fn [~'rule] (~'rule '~method ~url ~params)) 

is the same as just:

(fn [rule] (rule '~method ~url ~params)) 

and in this case probably will be better to write it like :

(fn [rule#] (rule# '~method ~url ~params)) 

Also will be great to have ability to pass more than one expression as body like in original compojure route, that is why I've added (do ~@body)

Thanks!

Raynes commented 11 years ago

While I'm pretty sure the old version was nuts and this is better, I'm going to let @yogthos look at it since I think he probably put this here and would know if this breaks it.

yogthos commented 11 years ago

It looks good to me, and definitely more correct.

Raynes commented 11 years ago

Yay teamwork!