-1

显示第 156 行引发的 app/views/student/edit.erb :

can't convert String into Integer

提取的源代码(在 #156 行附近):

154:<div class="label-field-pair">
155:<label for="student_country"><%= t('select_native') %></label>
156:<div class="text-input-bg_form"> <%= select :student,  :select_native, [["Arab","arab"]["Non Arab","non_arab" ]],  { :prompt => "#{t('select_native')}" } %> </div>
157:</div>
158: 
159: 
4

1 回答 1

1

数组中缺少逗号,添加逗号即可。

[["Arab","arab"],["Non Arab","non_arab" ]] 
<%= select :student,  :select_native, [["Arab","arab"], ["Non Arab","non_arab" ]],  { :prompt => "#{t('select_native')}" } %>
于 2013-11-08T06:56:54.693 回答