@kyanny's blog

My thoughts, my life. Views/opinions are my own.

def ppp(o); pp o.as_json; nil; end

link-edge(prod)> ppp st1.answer_usages.first
{"answer_attempt"=>
  {"_type"=>"MultipleChoiceAttempt",
   "choices"=>[BSON::ObjectId('57984b7c9c1cfd59cf00002c')],
   "correct"=>true,
   "id"=>BSON::ObjectId('5963fe1e0e056d709b002235')},
 "correct"=>true,
 "created_at"=>Mon, 10 Jul 2017 22:22:22 UTC +00:00,
 "id"=>BSON::ObjectId('5963fe1e0e056d709b002234'),
 "last_use"=>Mon, 10 Jul 2017 22:22:22 UTC +00:00,
 "nth_attempt"=>1,
 "question_id"=>BSON::ObjectId('57984b439c1cfd7d1f000034'),
 "question_position"=>0,
 "question_usage_id"=>BSON::ObjectId('5963fe1e0e056d709b002233'),
 "session_key"=>"5963761923215765b600004e_578dd6f89c1cfd00200002e0_1",
 "student_id"=>BSON::ObjectId('592eaadcbc62225786004aec'),
 "updated_at"=>Mon, 10 Jul 2017 22:22:22 UTC +00:00}
=> nil