On 6 July 2010 15:23, Pale Horse <[email protected]> wrote:
> Colin Law wrote:
>>>> Actually I think maybe it would be worthwhile knowing what your model
>>>> relationships are. �If you have the model relationships right then you
>>>> can do clever things with nested forms. �See
>>>> http://railscasts.com/episodes/196-nested-model-form-part-1 for
>>>> example.
>>
>> You have not responded to the above
>>
>>>>
>>>> Colin
>>>
>>> As I've said, this form isn't related to a model. It simply collects the
>>> parameters and mails them.
>>
>> In that case what is :order?
>>
>> You have not responded to my comments above suggesting where you may
>> be going wrong.
>>
>> Colin
>
> I was wrong to use :order because this is not a model form.
>
> So, http://pastie.org/1032691 should look more appropriate.

What about my other comments (snipped again I notice, I will go back
to the previous email to get them):
>>  Since you are attempting to pass a number of
>> different quantities each must have a different name.  In fact you
>> probably want to pass them as an array.

If you look at the html you should see that all the quantity input
fields have the same name so they will all be in the same parameter in
params which is no good.  Google for text_field_tag array to find
examples of how to do pass an array of values.

I still don't understand why you have not got an order model (it does
not have to map to a table in the db).  Where are you putting the
business logic for an order if you have not got an order model?

Colin

-- 
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