diff options
| author | hukl <hukl@eight.local> | 2009-02-08 14:06:03 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-02-08 14:06:03 +0100 |
| commit | 56e1df622f8cb6fb558b83fc4d2836ad0aece7d7 (patch) | |
| tree | 7cef4583f4b025847f4e0ce506fff8fc082ef30c /app/controllers/nodes_controller.rb | |
| parent | 1a6516c7c8103fb63e7e11134e0fd8ff9f26d6fe (diff) | |
added nodes controller and made it a resource.
since the node is the proxy for the pages behind
it, it makes sense to operate on nodes rather than
on the pages themselves.
Diffstat (limited to 'app/controllers/nodes_controller.rb')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb new file mode 100644 index 0000000..90cf756 --- /dev/null +++ b/app/controllers/nodes_controller.rb | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | class NodesController < ApplicationController | ||
| 2 | |||
| 3 | layout 'admin' | ||
| 4 | |||
| 5 | def index | ||
| 6 | @nodes = Node.root.children.all(:include => :head) | ||
| 7 | end | ||
| 8 | |||
| 9 | def new | ||
| 10 | end | ||
| 11 | |||
| 12 | def create | ||
| 13 | end | ||
| 14 | |||
| 15 | def show | ||
| 16 | @nodes = Node.find(params[:id]).children | ||
| 17 | end | ||
| 18 | |||
| 19 | def edit | ||
| 20 | @page = Node.find(params[:id]).draft | ||
| 21 | end | ||
| 22 | |||
| 23 | def update | ||
| 24 | end | ||
| 25 | |||
| 26 | def destroy | ||
| 27 | end | ||
| 28 | |||
| 29 | end | ||
