diff --git a/app/models/problem.rb b/app/models/problem.rb --- a/app/models/problem.rb +++ b/app/models/problem.rb @@ -1,5 +1,7 @@ class Problem < ActiveRecord::Base + belongs_to :description + def self.find_available_problems find(:all, :conditions => {:available => true}) end