I have this object of class Array
>> answers_to_problem
=> [#<Answer id: 807, problem_id: 1, player_id: 53, code: "function y = times2(x
)\r\n y = 2*x;\r\nend", message: nil, score: 12, output: nil, hide: nil, create
d_at: "2010-02-02 11:06:49", updated_at: "2010-02-02 11:06:49", correct_answer:
nil, leader: nil, success: true, cloned_from: nil>]
For doing a binary check, I need access to the success field. I am not sure I am even using the right terminology here so I can not search how to access it.
answer_to_problems was found this way:
answers_to_problem = Answer.find_all_by_problem_id_and_player_id(current_problem,player_id)
Ultimately, I want to do this check:
is_correct = (answers_to_problem.success == true)