diff options
| author | hukl <hukl@berlin.ccc.de> | 2009-01-29 22:12:11 +0100 |
|---|---|---|
| committer | hukl <hukl@berlin.ccc.de> | 2009-01-29 22:12:11 +0100 |
| commit | be47a4bbeac59d85af16b5e83e10ff242628519d (patch) | |
| tree | e25870a53dc19d10e7112ece98b82112d64cfe02 /app | |
| parent | d4dfdb40329b8e15e6bba022b966984a8a994a87 (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.rb | 7 | ||||
| -rw-r--r-- | app/models/node.rb | 3 | ||||
| -rw-r--r-- | app/views/layouts/application.html.erb | 0 |
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 @@ | |||
| 1 | class ContentController < ApplicationController | 1 | class 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 | ||
| 5 | end | 12 | end |
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 @@ | |||
| 1 | class Node < ActiveRecord::Base | ||
| 2 | acts_as_nested_set | ||
| 3 | end | ||
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 | |||
