I have this source rhtml file:
<%= start_form_tag :action => ‘create’ %>
<%for gigolo in @gigolos%>
<%= render :partial => ‘form’ %>
<%= submit_tag “Create” %>
<%= end_form_tag %>
<%= link_to ‘Back’, :action => ‘list’ %>
but when I execute it, I get the following:
NoMethodError in Service_gigolos#new
Showing app/views/service_gigolos/new.rhtml where line #5 raised:
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
Extracted source (around line #5):
3: <%= start_form_tag :action => ‘create’ %>
5: <%for gigolo in @gigolos%>
Can you suggest where my problem lies? Maybe I’m trying to
reference a non-existing data table in that context?