app/models/question.rb in ask-0.4.1 vs app/models/question.rb in ask-0.5.0

- old
+ new

@@ -1,10 +1,10 @@ class Question < ActiveRecord::Base require 'acts_as_list' - TYPES = ['TextQuestion', 'EssayQuestion', 'ChooseOneQuestion', 'ChecklistQuestion', 'FormSection'] + TYPES = ['TextQuestion', 'EssayQuestion', 'ChooseOneQuestion', 'ChecklistQuestion', 'UploadQuestion', 'FormSection'] belongs_to :asker, :polymorphic => true has_many :choices, :dependent => :destroy has_many :answers, :dependent => :destroy @@ -23,10 +23,11 @@ default = [ self.class.primary_key ] default << 'id' unless self.class.primary_key.eql? 'id' default end + # This just means it doesn't expect an answer, such as a form_section question def rhetorical? false end def supports_choices @@ -37,9 +38,13 @@ return [] unless supports_choices self.choices.map(&:name) end def supports_multiple_answers? + false + end + + def supports_uploads? false end end