plataformatec/simple_form — Issue #356: SimpleForm with NameSpace
Author: nehaverma8
Created: 2011-10-30 16:02:27+00:00
State: open

I have a namespaced admin controller
controllers/admin/products

In the admin view (views/admin/_form.html.erb ) for add products, I use
<%= simple_form_for @product, :validate=>true, :html => {:multipart => true} do |f| %>
...
<%>

In the routes, I have
namespace :admin do
resources :products
end

but the view fails with the error
No route matches {:controller=>"products}

What should I specify in simple_form_for so that the proper post/put route is generated ?

Note that I am using the same partial for new and edit products.