diff options
| author | hukl <hukl@eight.local> | 2009-02-01 14:39:13 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-02-01 14:39:13 +0100 |
| commit | 28270cfda18a18841615c57d117cbea96db1c6ec (patch) | |
| tree | 1c5452a2a50efd2decb4d24d57d383521a487227 /app/controllers | |
| parent | 05cacb3befdbd0ff7338dcfbc586f63a8893ff56 (diff) | |
fix for content_controller
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/content_controller.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index a78b8b5..5312ecd 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb | |||
| @@ -1,12 +1,18 @@ | |||
| 1 | class ContentController < ApplicationController | 1 | class ContentController < ApplicationController |
| 2 | 2 | ||
| 3 | def render_page | 3 | def render_page |
| 4 | path = params[:pagepath].join('/') | 4 | path = params[:page_path].join('/') |
| 5 | 5 | ||
| 6 | @page = Node.find_page(path) | 6 | @page = Node.find_page(path) |
| 7 | 7 | ||
| 8 | # Replace with real 404 | 8 | # Replace with real 404 |
| 9 | render :status => 404 unless @page | 9 | unless @page |
| 10 | render( | ||
| 11 | :file => File.join(RAILS_ROOT, 'public', '404.html'), | ||
| 12 | :status => 404 | ||
| 13 | ) | ||
| 14 | end | ||
| 15 | |||
| 10 | end | 16 | end |
| 11 | 17 | ||
| 12 | end | 18 | end |
