I’m a new ROR dev. I changed my stores_controller.rb and index.html.erb to the exact text as outline on page 151. All the parts up to page 151 are working fine.
In my browser I get the following error and do not know how to fix it:
NoMethodError in Stories#index
Showing /Users/xtremelabs/Desktop/shovells/app/views/stories/index.html.erb where line #2 raised:
undefined method `name’ for nil:NilClass
Extracted source (around line #2):
1: A random link:
2: <%= link_to @story.name, @story.link %>
Can someone please help me fix this?