2016-02-10 25 views
2

我想要管理員用戶能夠爲此帳戶創建新用戶並閱讀,從此帳戶更新用戶。cancancan創建權限無法正常工作條件散列

can [:create, :read, :update], User, id: account_users_ids 

如果account_users_ids不是空數組,則不起作用。 我需要拆分權限得到它的工作

can :create, User 
can [:read, :update], User, id: account_users_ids 

什麼是錯的界定條件

can [:create, :read, :update], User, id: account_user_ids 

感謝

回答