我在active_admin中使用CanCan能力。我想在页面展示中发表评论。但我用的CanCan是不能在显示页面添加评论的。
这是错误消息:
You are not authorized to perform this action.
在ability.rb
:配置ActiveAdmin::Comment
can [:read, :create], ActiveAdmin::Comment
我从这个看似无关的页面中找到了答案https://github.com/ryanb/cancan/issues/597