Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing ActiveAdmin resources

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?

like image 878
port5432 Avatar asked Oct 13 '11 14:10

port5432


3 Answers

Yes, deleting the respective resource file under app/admin is the correct approach :)

like image 92
Thomas Watson Avatar answered Nov 06 '22 19:11

Thomas Watson


You can also use

rails destroy active_admin:resource [ModelName]

to remove resource from ActiveAdmin.

like image 21
abhi-axis Avatar answered Nov 06 '22 19:11

abhi-axis


To add to Thomas Watson's answer, you also need to clean up references to the resource in your routes.rb file.

like image 5
forgotpw1 Avatar answered Nov 06 '22 18:11

forgotpw1