Permalink
Browse files

Hide projects from Project Listing based on apply_by_date

  • Loading branch information...
1 parent b2b9d41 commit 0046cbb8f1014342e95450189a2c99fb5a9f25a1 @kennethjohnbalgos kennethjohnbalgos committed Feb 19, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 app/controllers/projects_controller.rb
@@ -166,6 +166,8 @@ def basic_conditions
conditions = [[],[]]
conditions[0] << "#{SpProject.table_name}.show_on_website = 1"
conditions[0] << "(#{SpProject.table_name}.current_students_men + #{SpProject.table_name}.current_students_women + #{SpProject.table_name}.current_applicants_men + #{SpProject.table_name}.current_applicants_women) < (#{SpProject.table_name}.max_student_men_applicants + #{SpProject.table_name}.max_student_women_applicants)"
+ conditions[0] << "#{SpProject.table_name}.apply_by_date >= ?"
+ conditions[1] << Date.today
conditions
end

0 comments on commit 0046cbb

Please sign in to comment.