lib/surveyor_gui/models/question_methods.rb
def prep_picks
        write_attribute(:display_type, self.display_type || "default")
        if self.display_type=='stars'
          response_class='integer'
        else
          response_class='answer'
        end
        if self.answers.blank?
          self.answers_attributes={'0'=>{'response_class'=>response_class}}
        else
          self.answers.map{|a|a.response_class=response_class}
        end
      end
#If the question involves picking from a list of choices, this sets response class.
If the question involves picking from a list of choices, this sets response class.
If the question involves picking from a list of choices this sets response class .
def prep_picks
        write_attribute(:display_type, self.display_type || "default")
        if self.display_type=='stars'
          response_class='integer'
        else
          response_class='answer'
        end
        if self.answers.blank?
          self.answers_attributes={'0'=>{'response_class'=>response_class}}
        else
          self.answers.map{|a|a.response_class=response_class}
        end
      end
def prep_picks write_attribute ( :display_type , self . display_type || "default" ) if self . display_type == 'stars' response_class = 'integer' else response_class = 'answer' end if self . answers . blank? self . answers_attributes = { '0' => { 'response_class' => response_class } } else self . answers . map { | a | a . response_class = response_class } end end
If the question involves picking from a list of choices, this sets response class.
If the question involves picking from a list of choices this sets response class .