Quantcast
Channel: Rails 3 - Nested Resources - Routing - Stack Overflow
Browsing latest articles
Browse All 4 View Live

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 Article


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


Answer by Cory for Rails 3 - Nested Resources - Routing

Don't you need to redirect to order_products_url(@order)?

View Article

Rails 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
Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>