单击链接时,我的 Rails 应用程序中出现以下错误
<%= link_to 'Add New Slinky', new_admin_slinky_path %>
这是错误:
NoMethodError in Admin/slinkys#new
Showing /Users/Me/Folder/Folder/app/views/admin/slinkys/new.html.erb where line #7 raised:
undefined method `model_name' for NilClass:Class
Extracted source (around line #7):
4: <h5>Here is a header</h5>
5: <li>Here is a bullet</li>
6: <br>
7: <%= simple_form_for @slinky_file do |f| %>
8: <%= f.file_field :file %>
9: <br>
10: <%= f.submit "Upload" %>
这个错误是什么意思?第 7 行有什么问题?