I'm on Rails 3.1.1, Ruby 1.9.2 and the latest gem (pulled from github).
It's easy enough to add a resource to the excellent ActiveAdmin gem for Ruby. I can see you can also remove a resource by deleting the relevant .rb file开发者_开发百科 from app/admin.
I can't find anything in the documentation about it, but does anyone know is there another way the remove resources... or is deleting the ActiveAdmin resource file the correct way?
Yes, deleting the respective resource file under app/admin
is the correct approach :)
You can also use
rails destroy active_admin:resource [ModelName]
to remove resource from ActiveAdmin.
To add to Thomas Watson's answer, you also need to clean up references to the resource in your routes.rb file.
精彩评论