From 90f9e41671890f5ba249da2cc20ef7b38cc1493e Mon Sep 17 00:00:00 2001 From: sf Date: Mon, 10 Oct 2011 05:36:56 -0400 Subject: [PATCH] changed the condition to increase readability --- app/models/project.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 33814525..f3f43d12 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -108,9 +108,8 @@ class Project < ActiveRecord::Base end def needs_review?(current_user) - return false if self.completed? - return true if last_reviewed.nil? - return (active? && (last_reviewed < current_user.time - current_user.prefs.review_period.days)) + return active? && ( last_reviewed.nil? || + (last_reviewed < current_user.time - current_user.prefs.review_period.days)) end def blocked?