From 1ff4ece064039fce78953807583c5b5a1f1022f5 Mon Sep 17 00:00:00 2001 From: hukl Date: Mon, 9 Mar 2009 21:56:53 +0100 Subject: 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. --- app/controllers/content_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/controllers/content_controller.rb') 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 @page = Node.find_page(path) - if @page + if @page and @page.public? template = @page.valid_template render( @@ -25,4 +25,5 @@ class ContentController < ApplicationController end end + end -- cgit v1.3