I'm making a rails app in which one of user's have a teacher role and a teacher can teach many classes also a class can have many teachers. So how can i handle this in rolify and cancancan gem? I'm using rolify and cancancan gem for user roles.
I think a better solution would be to use a many to many relationship between teachers and classes. Using rolify helps you define multiple user roles and cancancan helps you define access permissions to these roles.