78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/generators/survey/metamodels/survey_metamodel_ext.rb', line 78
def real_choices
if self.is_a?(NumRatingScale)
choices2 = Array.new
(min..max).each do |i|
choices2 << Choice.new(:name => "#{self.name}_choice_#{i}", :title => "#{i}")
end
choices2
elsif self.is_a?(LikertRatingScale)
choices_by_a(LIKERT_SCALE)
elsif self.is_a?(RatingScale)
self.choices
elsif self.is_a?(ChoiceQuestion)
if !choices_s.blank? && choices.empty?
choices_by_s(choices_s)
else
self.choices
end
end
end
|