diff options
author | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-08-13 12:18:21 +0200 |
---|---|---|
committer | Joachim Filip Ignacy Bartosik <jbartosik@gmail.com> | 2010-08-14 13:23:42 +0200 |
commit | 297f717a4f7921b2a41f4ad5c6c721dfd47fc0cb (patch) | |
tree | 128aa06e80e3c5651358385807d9d2bfbdf5d4ed /app/models/question_category.rb | |
parent | Git ignore generated documentation for app. Short description of app. (diff) | |
download | recruiting-webapp-297f717a4f7921b2a41f4ad5c6c721dfd47fc0cb.tar.gz recruiting-webapp-297f717a4f7921b2a41f4ad5c6c721dfd47fc0cb.tar.bz2 recruiting-webapp-297f717a4f7921b2a41f4ad5c6c721dfd47fc0cb.zip |
Document models
Documented models:
Answer
Comment
EmailAnswer
Guest
MultipleChoiceAnswer
Option
Question
QuestionCategory
QuestionContentEmail
QuestionContentMultipleChoice
QuestionContentText
QuestionGroup
User
UserCategory
UserQuestionGroup
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 |