From 56e1df622f8cb6fb558b83fc4d2836ad0aece7d7 Mon Sep 17 00:00:00 2001 From: hukl Date: Sun, 8 Feb 2009 14:06:03 +0100 Subject: 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. --- app/controllers/nodes_controller.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 app/controllers/nodes_controller.rb (limited to 'app/controllers/nodes_controller.rb') 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 @@ +class NodesController < ApplicationController + + layout 'admin' + + def index + @nodes = Node.root.children.all(:include => :head) + end + + def new + end + + def create + end + + def show + @nodes = Node.find(params[:id]).children + end + + def edit + @page = Node.find(params[:id]).draft + end + + def update + end + + def destroy + end + +end -- cgit v1.3