sinatra-resources icon indicating copy to clipboard operation
sinatra-resources copied to clipboard

Added support for setting conditions on resources

Open roidrage opened this issue 15 years ago • 0 comments

To build an API I wanted to not repeat a condition to e.g. accept only JSON on every nested route of a resource, so I added support to specify them on a resource. Nested conditions will take higher priority, so a nested resource with a different condition than the parent will overwrite that setting. Hope this is useful to someone else.

roidrage avatar Jan 05 '11 08:01 roidrage