role_core: ActionView::Template::Error (unknown keyword: permitted_classes):
修改保存了角色的权限后,在进入修改页面报错,结果如下: 用户和角色是has_many to has_many 用了cancancan
ActionView::Template::Error (unknown keyword: permitted_classes):
23: </div>
24: </div>
25: <div class="col-md-12">
26: <%= render partial: "permissions", locals: {f: f, name: :permissions_attributes, permissions: role.permissions} %>
27: </div>
28: </div>
29: </div>
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (11 by maintainers)
@85636682 知道原因了,原因在于 Ruby 2.5.1 自带的 YAML 的序列化库
psych
版本过低,所以你只需要在你Gemfile
里加上gem "psych"
要求使用新版就可以了