Class: Survey::Question

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/survey/question.rb

Instance Method Summary collapse

Instance Method Details

#correct_optionsObject



29
30
31
# File 'app/models/survey/question.rb', line 29

def correct_options
  options.correct
end

#descriptionObject



41
42
43
# File 'app/models/survey/question.rb', line 41

def description
  I18n.locale == I18n.default_locale ? super : locale_description.blank? ? super : locale_description
end

#head_numberObject



45
46
47
# File 'app/models/survey/question.rb', line 45

def head_number
  I18n.locale == I18n.default_locale ? super : locale_head_number.blank? ? super : locale_head_number
end

#incorrect_optionsObject



33
34
35
# File 'app/models/survey/question.rb', line 33

def incorrect_options
  options.incorrect
end

#mandatory?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'app/models/survey/question.rb', line 49

def mandatory?
  self.mandatory == true
end

#textObject



37
38
39
# File 'app/models/survey/question.rb', line 37

def text
  I18n.locale == I18n.default_locale ? super : locale_text.blank? ? super : locale_text
end