diff options
| author | hukl <hukl@eight.local> | 2009-01-31 23:14:54 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-01-31 23:14:54 +0100 |
| commit | 5ccb76770646d8eb13ea379f5042670a8376d21e (patch) | |
| tree | 0efb195af04acf4b8bb7ce9de9f7978661bd552d /app/controllers | |
| parent | 8de27a58b5c401ecb324014bf9827b28f30d6044 (diff) | |
added everything needed to render a page
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/content_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index 8059fab..a78b8b5 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | class ContentController < ApplicationController | 1 | class ContentController < ApplicationController |
| 2 | 2 | ||
| 3 | def render_page | 3 | def render_page |
| 4 | path = params[:page_path].join('/') | 4 | path = params[:pagepath].join('/') |
| 5 | 5 | ||
| 6 | @node = Node.find_by_unique_name(path) | 6 | @page = Node.find_page(path) |
| 7 | 7 | ||
| 8 | # Replace with real 404 | 8 | # Replace with real 404 |
| 9 | render :status => 404 unless @node | 9 | render :status => 404 unless @page |
| 10 | end | 10 | end |
| 11 | 11 | ||
| 12 | end | 12 | end |
