From 1abe07ef85c0aac1b0c818c58abecefe64647044 Mon Sep 17 00:00:00 2001 From: Coleman Date: Wed, 13 Aug 2008 10:22:08 -0500 Subject: [PATCH] do not allow comments on pages older than 3 months... at least for now --- app/views/pages/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/pages/show.html.erb b/app/views/pages/show.html.erb index c84dc58..30592d8 100644 --- a/app/views/pages/show.html.erb +++ b/app/views/pages/show.html.erb @@ -1,7 +1,7 @@ <% throw_content :for_sidebar do -%> <% if allowed_to?(:edit_page, @page) -%> Edit page
<% end -%> <% if allowed_to?(:delete_page, @page) -%> Destroy page
<% end -%> - Post a comment
+ <% if @page.created_at + 3.months > Time.now -%> Post a comment
<% end -%> <% end -%> <%= partial :page, :with => [ @page ] %>