Apology accepted, but ultimately didn't this become an issue of 'my
coding process is better than your coding process'?

Anyway, playing around with it, I got it to work, so in the hope that
months from now, someone will come across the same issue, here is the
working answer. It was simple, and for some reason I thought I had
tried it already and clearly hadn't, but you actually do seperate each
iteration into a seperate form.

 <% @items.each do |item| %>
<% form_for :lineitems, :url => {:action => 'create', :id=>
@invoice.id} do |f|-%>




<%=item.itemname %> <%= f.hidden_field :item_id, :value=>item.id %>
      <%= f.text_field :quantity %>
      <%= f.text_field :price, :value => item.sellprice %>

    <%= f.submit 'Add Item' %> <br/>
      <% end %>

  <% end %>

Does what I need it to do, though if this can be done as one form, I'd
be interested to see the code :-)

On Sep 6, 1:58 pm, Hassan Schroeder <[email protected]>
wrote:
> On Sun, Sep 6, 2009 at 10:48 AM, Colin Law<[email protected]> wrote:
> >  ... There is no point validating it before it is
> > functional (unless not sure why it is not functional of course in
> > which case validating it is useful).
>
> Exactly my point. It is totally possible for invalid markup, particularly
> involving forms (as well as JavaScript), to *prevent* the page from
> being "functional".
>
> Ignoring a failing validation is just like ignoring a failing unit test. You
> should fix it *now* and move on.
>
> #  And apologies to the OP for the thread semi-hijack :-)
>
> --
> Hassan Schroeder ------------------------ [email protected]
> twitter: @hassan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to