L
laredotornado
Hi,
I'm trying to create a form where a user can submit 5 of the same
object (named "ec_line_item" with attributes "item_number" and
"comments"). I'm doing something wrong because I'm getting this
error:
NameError in Order#start
Showing app/views/order/start.rhtml where line #15 raised:
`@ec_line_item' is not allowed as an instance variable name
Here's my code:
<% for i in 1 .. 5 %>
<tr><td>
<table>
<tr>
<td><%= text_field("ec_line_item", "item_number") %></
td>
<td><%= text_field("ec_line_item", "comments") %></td>
</tr>
<tr>
<td align="center">Item Number</td>
<td align="center">Comments</td>
</tr>
</table>
</td></tr>
<% end %>
Any ideas? - Dave
I'm trying to create a form where a user can submit 5 of the same
object (named "ec_line_item" with attributes "item_number" and
"comments"). I'm doing something wrong because I'm getting this
error:
NameError in Order#start
Showing app/views/order/start.rhtml where line #15 raised:
`@ec_line_item' is not allowed as an instance variable name
Here's my code:
<% for i in 1 .. 5 %>
<tr><td>
<table>
<tr>
<td><%= text_field("ec_line_item", "item_number") %></
td>
<td><%= text_field("ec_line_item", "comments") %></td>
</tr>
<tr>
<td align="center">Item Number</td>
<td align="center">Comments</td>
</tr>
</table>
</td></tr>
<% end %>
Any ideas? - Dave