diff options
| author | hukl <contact@smyck.org> | 2010-05-09 11:25:48 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2010-05-09 11:25:48 +0200 |
| commit | f169cd4b7b4f2c6d39efb917ef88065d72c48d9d (patch) | |
| tree | d6a3224bd35919f90d36dbc76abbceff92db3bb9 /app/controllers/content_controller.rb | |
| parent | b24df82fee134f13e2dd589d6b611b7b761ea14d (diff) | |
return 404 for non existent galleries
Diffstat (limited to 'app/controllers/content_controller.rb')
| -rw-r--r-- | app/controllers/content_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index 26aac7d..1b13456 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb | |||
| @@ -28,8 +28,12 @@ class ContentController < ApplicationController | |||
| 28 | end | 28 | end |
| 29 | 29 | ||
| 30 | def render_gallery | 30 | def render_gallery |
| 31 | @images = @page.assets.images | 31 | unless @page.nil? |
| 32 | render :file => "content/gallery" | 32 | @images = @page.assets.images |
| 33 | render :file => "content/gallery" | ||
| 34 | else | ||
| 35 | render :nothing => true, :status => 404 | ||
| 36 | end | ||
| 33 | end | 37 | end |
| 34 | 38 | ||
| 35 | private | 39 | private |
