Class: ChosenAnswer

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Trivia::ChosenAnswer
Defined in:
lib/generators/trivia/install/templates/app/models/chosen_answer.rb

Instance Method Summary collapse

Instance Method Details

#process_answerObject



6
7
8
9
10
11
12
13
# File 'lib/generators/trivia/install/templates/app/models/chosen_answer.rb', line 6

def process_answer
  if self.answer.right?
    # Add points to user, etc.
    #
    # Reward models and DSL:
    # https://github.com/SmartMedia/treasure_hunt
  end
end