Can someone help me to correct my associations ?
I have the following models:
User, Developer, Application, Comments, Rating, Permission
Requirements:
A user can be a Developer or not.
A user can have Default Permissions and Permissions for each application
A user can install multiple Applications
A user can comment and rate multiple Applications
A developer can develop multiple applications
An application can request a list of permissions.
I already created some associations but I believe its not 100% correct or an easier way to do it exist.
Can someone suggest me a correct way to do it?
You are confusing models with authorization.
You should check out CanCan for role based authorization. For example you don't need your developer model since its just a user with a different role/permissions.
Edit: Changed 'role based authentication' to 'role based authorization'. As the comment below points out the difference between authentication and authorization.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With