【发布时间】:2016-04-20 11:32:19
【问题描述】:
我在尝试使用 collection_select 时出错;)
我在我看来得到了这段代码:
<%= f.collection_select(:channel, :channel_id, @channels, :id, :channelname, prompt: true) %>
在我的控制器中我有这个:
@channels = Channel.all
我得到了这个错误:
undefined method `merge' for :channelname:Symbol
我的失败是什么?
非常感谢!
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-4