I've been asked to put together an application in RoR which has multiple roles for users. The idea is that a user will have a role, Admin, Moderator, User ect... and they will also have a department as well, HR, IT, Customer Care ect....
The app will have designated sections for each department to manage data and other basic CRUD based tasks.
What the app needs to allow is so a user can only access departments they are assigned to, a user can have multiple departments, a user can be a Admin of one department but may be only a user of another department.
Whats the best way of putting something like this together?