no implicit conversion of Symbol into Integer

已查看 180 次
跳至第一个未读帖子

fugee ohu

未读,
2019年10月21日 18:35:372019/10/21
收件人 Ruby on Rails: Talk
error is caused by line 4

 1 <% @item_properties.each do |ip| %>
 2     <div class="field">
 3       <%= f.label "#{ip.name}".downcase %>
 4       <%= f.text_area [:item][:item_item_property][ip.name.downcase.to_sym] %>
 5     </div>
 6  <% end %>

Rob Jonson

未读,
2019年10月22日 12:45:032019/10/22
收件人 Ruby on Rails: Talk
yup - sounds like you have nailed that one.

As you say; The error here is in trying to implicitly convert a symbol into an integer.

Isn't it great how Rails (ruby) helps you out.
回复全部
回复作者
转发
0 个新帖子