gregbell/active_admin — Issue #763: Disable routes for unimplemented routes
Author: jcarlson
Created: 2011-11-20 16:18:22+00:00
State: open

If I specify only certain actions to be defined, then ActiveAdmin correctly generates a controller which only responds to those actions. However, the generated routes do not consider actions that have been excluded.

Observe:

```ruby
ActiveAdmin.register Foo do

actions :index

end
```

```bash
Eos:sandbox jcarlson$ rake routes
admin_foos GET /admin/foos(.:format) {:action=>"index", :controller=>"admin/foos"}
POST /admin/foos(.:format) {:action=>"create", :controller=>"admin/foos"}
new_admin_foo GET /admin/foos/new(.:format) {:action=>"new", :controller=>"admin/foos"}
edit_admin_foo GET /admin/foos/:id/edit(.:format) {:action=>"edit", :controller=>"admin/foos"}
admin_foo GET /admin/foos/:id(.:format) {:action=>"show", :controller=>"admin/foos"}
PUT /admin/foos/:id(.:format) {:action=>"update", :controller=>"admin/foos"}
DELETE /admin/foos/:id(.:format) {:action=>"destroy", :controller=>"admin/foos"}
```

Short of patching `ActiveAdmin::Router#apply`, any other suggestions to eliminate the routes with no matching controller action?