开发者

Removing ActiveAdmin resources

开发者 https://www.devze.com 2023-04-12 15:14 出处:网络
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 del

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号