diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/nodes_controller.rb | 9 | ||||
| -rw-r--r-- | app/views/nodes/edit.html.erb | 2 |
2 files changed, 10 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( |
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 6848dfb..f457bc7 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | <h1>Nodes#edit</h1> | 1 | <h1>Nodes#edit</h1> |
| 2 | 2 | ||
| 3 | <%= link_to 'Publish', publish_node_path, :method => :put %> | ||
| 4 | |||
| 3 | <h1>Editing page</h1> | 5 | <h1>Editing page</h1> |
| 4 | 6 | ||
| 5 | <%= I18n.locale %> | 7 | <%= I18n.locale %> |
