So I am trying to set up a model in rails called admin.
Admin can perform basic CRUD operations on a user model
Admin can do similar stuff on other models as well
My problem is how to set it up. I asked for ideas and someone suggested that I create a separate model for both the admin and user. Based on his explanation he said there will be no need for a connection between the Admin and user because it will likely constraint the Admin to maybe one user. This argument does not sit well with me so I thought I should ask what you guys think.
What is the best way to approach this? How will the model look like? is there another better/optimal way to approach this? The way I want it setup is that Admin can add new users but users cannot and will not have any CRUD operations on the Admin or any other models. Only the Admin can perform CRUD on other models for example User. To clarify the app is a rental app where the Admin registers users when the user makes request to rent a product. The admin does it on behalf of the user. And once the registration is done the user’s details is matched with the product and the details of the request. That is my idea of what the backend should be. Now my concern is how will the Admin do CRUD operations without some form of association with the user model? If possible can someone help on how to get it working? and if it is not, how do I go around it? I really need help on it. Thanks.