aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/question_content_multiple_choice.rb')
-rw-r--r--app/models/question_content_multiple_choice.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/models/question_content_multiple_choice.rb b/app/models/question_content_multiple_choice.rb
index c3315c3..f1b3298 100644
--- a/app/models/question_content_multiple_choice.rb
+++ b/app/models/question_content_multiple_choice.rb
@@ -4,13 +4,14 @@ class QuestionContentMultipleChoice < ActiveRecord::Base
hobo_model # Don't put anything above this
fields do
- content HoboFields::MarkdownString
+ content HoboFields::MarkdownString, :null => false
timestamps
end
- belongs_to :question
- attr_readonly :question
- has_many :options, :as => :option_owner, :accessible => true, :uniq => true
+ belongs_to :question
+ attr_readonly :question
+ has_many :options, :as => :option_owner, :accessible => true, :uniq => true
+ validates_length_of :content, :minimum => 2
inherit_permissions(:question)