↧
Answer by Jaime Bellmyer for Rails 3 - Nested Resources - Routing
order_products_url expects a parameter to be passed - either the order id, or the order object itself. Without this, it won't work properly. So using your code above:def destroy @product =...
View ArticleAnswer by sethvargo for Rails 3 - Nested Resources - Routing
you should be using orer_products_path (not url). If you go to the root of your app and type, rake routesthat will give you a list of all named routes. You need to append _path to them though (returns...
View ArticleAnswer by Cory for Rails 3 - Nested Resources - Routing
Don't you need to redirect to order_products_url(@order)?
View ArticleRails 3 - Nested Resources - Routing
I'm having issues with my destroy method on a nested source Product, that is tied to Orders.After attempting to destroy an item, I'm redirecting users to my order_products_url. I receive the following...
View Article