diff options
Diffstat (limited to 'app/models/question_category.rb')
-rw-r--r-- | app/models/question_category.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/question_category.rb b/app/models/question_category.rb index bcf2db7..7c4b78f 100644 --- a/app/models/question_category.rb +++ b/app/models/question_category.rb @@ -1,3 +1,5 @@ +# Questions are arranged in categories. Recruit should answer question in some +# categories. class QuestionCategory < ActiveRecord::Base hobo_model # Don't put anything above this @@ -15,6 +17,8 @@ class QuestionCategory < ActiveRecord::Base include Permissions::AnyoneCanViewAdminCanChange + # Array of arrays [Category name, Category id], includes also + # ['All Categories', nil] array. def self.as_select_opts [['All Categories', nil]] + QuestionCategory.all(:select => 'name, id').collect{ |q| [q.name, q.id]} end |