Ruby on rails 3.2 如何在Rails\u Admin中仅显示类别的子类别

Ruby on rails 3.2 如何在Rails\u Admin中仅显示类别的子类别,ruby-on-rails-3.2,rails-admin,Ruby On Rails 3.2,Rails Admin,我有以下型号: Category has_and_belongs_to_many :subcategories has_many :resources Subcategory has_and_belongs_to_many :categories has_and_belongs_to_many :resources Resource has_and_belongs_to_many :subcategories belongs_to :category 在Rails_Admin中,创建

我有以下型号:

Category

has_and_belongs_to_many :subcategories
has_many :resources

Subcategory

has_and_belongs_to_many :categories
has_and_belongs_to_many :resources
Resource

has_and_belongs_to_many :subcategories
belongs_to  :category
在Rails_Admin中,创建或编辑资源时,我希望显示所选类别的子类别

我如何在rails\u admin中做到这一点?

这将为您提供一些选项,以满足您的需要。另外,这里还有一个关于在rails_admin中为关系构建自定义视图的内容

编辑
查看此帖子

感谢迈克提供的链接,但这并不是我想要的。我想根据所选的类别显示子类别的复选框。@chell-我已经用另一个可能有用的解决方案更新了我的答案。