Class: Survey::Attempt
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Survey::Attempt
- Defined in:
- app/models/survey/attempt.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.high_score ⇒ Object
42 43 44 |
# File 'app/models/survey/attempt.rb', line 42 def self.high_score return scores.first.score end |
Instance Method Details
#correct_answers ⇒ Object
34 35 36 |
# File 'app/models/survey/attempt.rb', line 34 def correct_answers return self.answers.where(:correct => true) end |
#incorrect_answers ⇒ Object
38 39 40 |
# File 'app/models/survey/attempt.rb', line 38 def incorrect_answers return self.answers.where(:correct => false) end |