0
我使用CanCan能力在active_admin.I想要在頁面中顯示評論show.But我使用CanCan是不能在顯示頁面添加評論。CanCan在rails中的能力active_admin是不能評論
這是錯誤消息:
You are not authorized to perform this action.
我使用CanCan能力在active_admin.I想要在頁面中顯示評論show.But我使用CanCan是不能在顯示頁面添加評論。CanCan在rails中的能力active_admin是不能評論
這是錯誤消息:
You are not authorized to perform this action.
配置ActiveAdmin::Comment
在ability.rb
:
can [:read, :create], ActiveAdmin::Comment
我找到了答案,從這個看似無關的網頁https://github.com/ryanb/cancan/issues/597
非常感謝你much.It的爽! !!!! – Bustex