summaryrefslogtreecommitdiff
path: root/app/controllers/nodes_controller.rb
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-02-21 14:38:14 +0100
committerhukl <contact@smyck.org>2009-02-21 14:38:14 +0100
commit4c3d622b3795836e1e7be4df303ee256a88b2812 (patch)
treee644596d27e4943477a76ab516ed50a1d63a2ab2 /app/controllers/nodes_controller.rb
parent6eb546b6cbd2fa39d2663ab83b44fbde10507d70 (diff)
adding @node filter for publish action and setting
a new member route for the nodes resource so that a put request on /nodes/id/publish will publish the current draft of a node
Diffstat (limited to 'app/controllers/nodes_controller.rb')
-rw-r--r--app/controllers/nodes_controller.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb
index 1515fdf..6d400bc 100644
--- a/app/controllers/nodes_controller.rb
+++ b/app/controllers/nodes_controller.rb
@@ -2,7 +2,14 @@ class NodesController < ApplicationController
2 2
3 layout 'admin' 3 layout 'admin'
4 before_filter :login_required 4 before_filter :login_required
5 before_filter :find_node, :only => [:create, :show, :edit, :update, :destroy] 5 before_filter :find_node, :only => [
6 :create,
7 :show,
8 :edit,
9 :update,
10 :destroy,
11 :publish
12 ]
6 13
7 def index 14 def index
8 @nodes = Node.root.descendants.paginate( 15 @nodes = Node.root.descendants.paginate(