Hello everyone, I have a problem while opening something like
Here is the template for show.rhtml
<% for name in @names %>
<%= name.full_name %>
And here is the code specific to the show on the main_controller.rb
name = Name.find(params[:id])
And here is the error im getting.
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.each
Any idea on what the problem might be? Any help would be great, thanks!