oh my, putting

form_for [@inventory, @order]

worked.
Thanks a million!!

On May 6, 6:14 pm, Jens Fahnenbruck <[email protected]> wrote:
> You can try
>
> <% form_for [@inventory, @order] do |f| -%>
>
> this will create the correct url (<form action="/inventories/4000/orders 
> method="post">). And you can get rid of the hidden field with the 
> inventory_id.
>
> why do you have `if !@inventory` around your submit tag? If the form is only 
> available with the nested resource url, than it should be always available.
> On Samstag, 7. Mai 2011 at 00:01, Mlle wrote:
> <% form_for :order do |f| -%>
>
>
>
>
>
>
>
> > <p><%= label_tag 'Quantity Requested by order:' %><br/>
> > <%= f.text_field :qty_requested %></p>
> > <%= f.hidden_field :inventory_id, :value=>@inventory.inventory_id %>
> > <p><% if [email protected]?%><%= submit_tag 'Submit', :id =>
> > @inventory.inventory_id %></p><% end %>
> > <% end %>

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