I'm trying to use the link\_to helper function to create a new order for a particular product. Here is my:

product model

```
class Product < ActiveRecord::Base
  has_many :orders
end

```

routes.rb

```
resources :products, :only => [:show, :new, :create, :index, :update, :destroy] do
    resources :orders, :only => [:create]
  end

```

view for product/show.html.erb

```
<%= link_to 'New Order', new_product_orders_path(@product) %>

```

controller for orders

```
class OrdersController < ApplicationController

  def create
    @order = Order.new
  end

end

```

relevant rake routes: 

```
product_orders POST   /products/:product_id/orders(.:format)                                     orders#create

```

But when I do that I get undefined method `new\_product\_orders\_path' 

Whats the correct way to do this in Rails 4?