I am using activeadmin with cancancan gem. Where I need to update only 2 fields from user model.
For ex. If we can say, I have User model with name, email, is_admin, is_active.
But from admin, I need to create ability like that where I can only update is_admin and is_active attributes of a User model.
Right now I am trying with this but it's not working:
can [:read, :update], User, :attributes => [:is_admin, :is_active]
role
filed – uzaifcan [:read,:update], User, is_active: true,is_admin:true
– uzaif