kieran / barista

A URL router / generator for NodeJS
https://kieran.github.io/barista/
MIT License
111 stars 22 forks source link

Limiting the methods of the Resource class #23

Open jorr opened 10 years ago

jorr commented 10 years ago

Are there any plans to add support for limiting the access points to a REST resource using something akin to Rails' only/except:

resources :posts do resources :comments, only: [:index, :new, :create] end

resources :photos, except: :destroy

An example would be:

router.resource("posts").only(["index","new","create"]); router.resource("photos").except(["destroy"]);

techwraith commented 10 years ago

+1, this would be great. We could build this into Geddy's generators as well.