I have a resource :products in a namespace :shop, like this:
namespace :shop do
resources :products
root :to => 'products#index'
end
When running rake routes
it outputs the following:
edit_shop_product GET /shop/products/:id/edit(.:format) {:action=>"edit", :controller=>"shop/products"}
But when I use the edit_shop_product_path
in a partial view, like this:
<%= button_to "Edit", edit_shop_product_path(product) %>
I get an ActionController Exception: No route matches "/shop/products/1/edit"
What am I missing?