summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorhukl <hukl@berlin.ccc.de>2009-01-29 22:12:11 +0100
committerhukl <hukl@berlin.ccc.de>2009-01-29 22:12:11 +0100
commitbe47a4bbeac59d85af16b5e83e10ff242628519d (patch)
treee25870a53dc19d10e7112ece98b82112d64cfe02 /app
parentd4dfdb40329b8e15e6bba022b966984a8a994a87 (diff)
added node model to make basic functional tests pass. added awesome_nested_set plugin
Diffstat (limited to 'app')
-rw-r--r--app/controllers/content_controller.rb7
-rw-r--r--app/models/node.rb3
-rw-r--r--app/views/layouts/application.html.erb0
3 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb
index afa093c..8059fab 100644
--- a/app/controllers/content_controller.rb
+++ b/app/controllers/content_controller.rb
@@ -1,5 +1,12 @@
1class ContentController < ApplicationController 1class ContentController < ApplicationController
2
2 def render_page 3 def render_page
4 path = params[:page_path].join('/')
5
6 @node = Node.find_by_unique_name(path)
7
8 # Replace with real 404
9 render :status => 404 unless @node
3 end 10 end
4 11
5end 12end
diff --git a/app/models/node.rb b/app/models/node.rb
new file mode 100644
index 0000000..82183c9
--- /dev/null
+++ b/app/models/node.rb
@@ -0,0 +1,3 @@
1class Node < ActiveRecord::Base
2 acts_as_nested_set
3end
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/views/layouts/application.html.erb