Class: Survey::Answer
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Survey::Answer
- Defined in:
- app/models/survey/answer.rb
Instance Method Summary collapse
Instance Method Details
#correct? ⇒ Boolean
30 31 32 |
# File 'app/models/survey/answer.rb', line 30 def correct? self.correct or self.option.correct? end |
#value ⇒ Object
22 23 24 25 26 27 28 |
# File 'app/models/survey/answer.rb', line 22 def value unless self.option == nil self.option.weight else Survey::Option.find(option_id).weight end end |