summaryrefslogtreecommitdiff
path: root/app/controllers/content_controller.rb
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-03-09 21:56:53 +0100
committerhukl <contact@smyck.org>2009-03-09 21:56:53 +0100
commit1ff4ece064039fce78953807583c5b5a1f1022f5 (patch)
treeb5fe2e7077ef0d91e6072f17f61ad5e9e47e0dbb /app/controllers/content_controller.rb
parent55bc7e53f260bda99fd007d3422b264e1f4f6124 (diff)
only render pages if their published_at date is either nil or set to a time < Time.now. The render_page method will render a 404 otherwise.
Diffstat (limited to 'app/controllers/content_controller.rb')
-rw-r--r--app/controllers/content_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb
index 706cfcd..d548a34 100644
--- a/app/controllers/content_controller.rb
+++ b/app/controllers/content_controller.rb
@@ -10,7 +10,7 @@ class ContentController < ApplicationController
10 10
11 @page = Node.find_page(path) 11 @page = Node.find_page(path)
12 12
13 if @page 13 if @page and @page.public?
14 template = @page.valid_template 14 template = @page.valid_template
15 15
16 render( 16 render(
@@ -25,4 +25,5 @@ class ContentController < ApplicationController
25 end 25 end
26 26
27 end 27 end
28
28end 29end