gregbell/active_admin — Issue #890: Problem with Namespace Resources
Author: thegreyjoy
Created: 2012-01-03 14:21:08+00:00
State: open

I think one of the recent commits prevents namespaced resources from working correctly. As an example:

```ruby
ActiveAdmin.register Vat::Company do
#other code here
end

With the definition above, ActiveAdmin will generate the routes as:
new_admin_company GET /admin/companies/new(.:format) {:action=>"new", :controller=>"admin/companies"}
edit_admin_company GET /admin/companies/:id/edit(.:format) {:action=>"edit", :controller=>"admin/companies"}
admin_company GET /admin/companies/:id(.:format) {:action=>"show", :controller=>"admin/companies"}

The routes above are missing the "vat" prefix. I was able to restore the old behavior with the following patch. I wanted to make sure that I wouldn't be messing anything up if I submitted it as a pull. I'm also sure that there is a more efficient solution.