0
나는의 객체의 배열을 h've 질문 @questions루비/RoR에 - 연관 배열에 객체의 배열을 반복
---
- !ruby/object:Question
attributes:
id: "1"
answer: "2"
- !ruby/object:Question
attributes:
id: "7"
answer: "1"
- !ruby/object:Question
attributes:
id: "6"
answer: "4"
- !ruby/object:Question
attributes:
id: "4"
answer: "1"
및 답변의 배열은 @answers
--- !map:ActiveSupport::HashWithIndifferentAccess
"1": "2"
"7": "3"
"6": "4"
"4": "0"
어떻게 어떤 루프 메커니즘으로 질문에 대한 답변을 확인합니까? 첫번째 질문에 대해서만 응답이 정확 위의 예에서
, 제가 나가--- !map:ActiveSupport::HashWithIndifferentAccess
"1": true
"7": false
"6": false
"4": false