我觉得像一个老板提出这样的要求,但既然我给发展带来了新的希望,而且我现在坐在这里一小时做一件非常简单的工作,我需要问。
我愿向每个植被展示,但我仍然希望:
You have a nil object when you didn t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
I Trial using <%= debug @widgets %>and <%= @widgets. 检查百分比;但我指挥中没有显示迅速或浏览器。
我正试图在。
在我的控制人员中,我叫P-2职等的主计长:
def widgets_to_show
@widgets = Widget.all
end
我认为(pwidgets_to_show),我已经:
<% @widgets.each do |widget| %>
<%= widget.title %>
<% end %>
- I have a widget model
- I also have values in the widgets table
- and I have a title field, so I m not sure what I m doing wrong
我试图在一页上展示它,该页使用了高压胶合物(https://github.com/thoughtbot/high_voltage),这样会有所改变。