diff options
| -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 |
