Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Hide projects from Project Listing based on apply_by_date

  • Loading branch information...
commit 0046cbb8f1014342e95450189a2c99fb5a9f25a1 1 parent b2b9d41
@kennethjohnbalgos kennethjohnbalgos authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  app/controllers/projects_controller.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.