更新时间:2023-02-25 19:36:02
到目前为止,这是不可能的。但是根据此内容: https://github.com/ryanb/cancan/issues/326此功能应该在cancan 2.0中。
So far it is not possible. But according to this: https://github.com/ryanb/cancan/issues/326 this feature should be in cancan 2.0.
更新:您可以在CanCan 2.0分支上看到此功能: https://github.com/ryanb/cancan/tree/2.0 在资源属性部分
Update: you can see this on CanCan 2.0 branch here: https://github.com/ryanb/cancan/tree/2.0 in section "Resource Attributes"