Displaying 1 result from an estimated 1 matches for "item_lin".
Did you mean:
item_len
2006 Mar 21
2
Can you render partial with collection non-existent rows?
Hi,
I''m trying to create a blank input form with a header and many item
lines. I would like to build the item lines dynamically ie not hard code
up to 100 lines into my form. Is it possible to use render partial with
a dummy collection for this? When I try to render with @item_lines
holding 1 object created with .new, I get:
ActionView::TemplateError (undefined method `each_with_index'' for
#<Item:0x24c98b8>) on line #22 of app/views/receipts/new.rhtml:
21:
22: <%= render :partial => ''item_line'', :collection => @item_lines
%&g...