README.rdoc

February 3, 2010 ยท View on GitHub

= CRUDtree

== Summary

A resource helper mainly for usher, but may be adapted for other routers as well.

== See

Usher:: http://github.com/joshbuddy/usher IRC:: #rango@irc.freenode.net Baretest:: http://github.com/apeiros/baretest

== Terminology

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.

== Usage

=== as Tinkerer

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

=== As Dev

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