我按照https://github.com/stefankroes/ancestry的说明成功安装了祖先 gem ,我的类别表如下所示:
类别(id、category_name、ancestry、created_at、updated_at)
我想根据 parent->sub-category->sub-sub-category 进行选择:
此时使用代码(取自https://github.com/stefankroes/ancestry/wiki/Creating-a-selectbox-for-a-form-using-ancestry)我只能设法获得不正确的关注。