Class: AskIt::Answer

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/ask_it/answer.rb

Instance Method Summary collapse

Instance Method Details

#correct?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'app/models/ask_it/answer.rb', line 33

def correct?
  correct || option.correct?
end

#valueObject



25
26
27
28
29
30
31
# File 'app/models/ask_it/answer.rb', line 25

def value
  if option.nil?
    AskIt::Option.find(option_id).weight
  else
    option.weight
  end
end