我正在测验应用程序,我不能使用collection_radio_buttons
答案选择。我有一个测试表。'收集单选按钮不是符号'错误红宝石
`Question = test.question`, `choice A = test.answerA` and so on.
<%=
collection_radio_buttons(:test, test[:id], Test.all, :id, [[test.answerA], [test.answerB], [test.answerC], [test.answerD]], {})
%>
但是,这是给我的错误:
[["A) rasmiy"], ["B) ilmiy"], ["C) so'zlashuv"], ["D) badiiy"]]` is not a symbol
这究竟是为什么?
尝试:'collection_radio_buttons(:测试,:为test_id,Test.all,:ID,[test.answerA,test.answerB,test.answerC,test.answerD],{}) ' –
不幸的是,它没有帮助,Marc-Alexandre Berube。 :(((错误保持不变!) –
什么是Test.all? – mysmallidea