Skip to content

Commit

Permalink
fixed incorrect activerecord query in incomplete_research
Browse files Browse the repository at this point in the history
  • Loading branch information
greggroth committed Apr 20, 2012
1 parent bd05099 commit 2a42589
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/student.rb
Expand Up @@ -64,11 +64,11 @@ def self.incomplete_qual
def self.incomplete_research(options={})
case options
when :ms
self.where('degree = ? AND alt_research_1 = ?', 'Masters', '')
where('degree = ? AND alt_research_1 IS ?', 'Masters', nil)
when :phd
self.where('degree = ? AND (alt_research_1 = ? OR alt_research_2 = ?)', 'PhD', '','')
where('degree = ? AND (alt_research_1 IS ? OR alt_research_2 IS ?)', 'PhD', nil, nil)
else
self.incomplete_research(:ms) + self.incomplete_research(:phd)
incomplete_research(:ms) + incomplete_research(:phd)
end
end

Expand Down

0 comments on commit 2a42589

Please sign in to comment.