Вопрос

I have added an admin flag to my users model following the devise wiki here (the second option):

https://github.com/plataformatec/devise/wiki/How-To%3a-Add-an-Admin-role

but not in rails_admin the admin flag is disabled, isn't it supposed to be a checkbox instead of a grey circle.

Это было полезно?

Решение

This is because rails_admin automatically disables this field for safety reasons. To re-enable it, you can set the config.attr_accessible_role field in config/initializers/rails_admin.rb, like this:

config.attr_accessible_role { nil } 
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top