Closed
Description
when both product and order are exhibits
simple_form_for [product, order]
generates
<form accept-charset="UTF-8" action="/products/2/orders?product_id=2" class="simple_form new_order" id="new_order" method="post" novalidate="novalidate">
I don't know why it does that, but having the product_id twice means I can't find the product from the params (since params[:product_id] == ['2','2']
new_product_order_path(product)
behaves the same way.
new_product_order_path(product.to_model)
generates the right URL, but seems to go against the simple delegation pattern - why do I have to remember where I need a model and where I need an exhibit? It's like a duck with a speech impediment. ;-)
This feels like it is probably Rails doing some kind of type-checking, but so far I can't confirm.
Metadata
Metadata
Assignees
Labels
No labels