A resource helper mainly for usher, but may be adapted for other routers as well.
- Usher
- IRC
-
#rango@irc.freenode.net
- Baretest
- Master
-
The main body, only one per Usher instance as well.
- Node
-
You attach other Nodes or EndNodes as subnodes here.
- EndNode
-
A route endpoint.
require 'crudtree/interface/usher/rack' Usher::Interface.for(:rack) do extend CRUDtree::Interface::Usher::Rack node(klass: Posts, model: Post) do sub(type: :member, call: :show, rest: :get) sub(type: :collection, call: :index, rest: :get) end end
require 'crudtree/interface/usher/rack' require 'crudtree/helper' Usher::Interface.for(:rack) do extend CRUDtree::Interface::Usher::Rack extend CRUDtree::Interface::Helper resource(klass: Posts, model: Post) do # the resource helper will include a bunch of default routes member(call: :show, rest: :get) collection(call: :index, rest: :get) end end