YelpDemo - User Admin Rights
I've added /admin/users to the YelpDemo project. In the users view page, I have various user attributes displaying such as First Name, Last Name, Last Log In, Admin, etc... Currently the admin field just displays true or false depending on the user. What would be the best way to go about changing this attribute, and updating the admin column in the user table to true or false?
I was thinking to use a dropdown to select true or false, and then update the selection in the database. This page would be a lot easier and quicker to use, rather than having to pull up the console on the server every time to grant or revoke admin rights for a user. I assume that I would also need to create some kind of action in the controller, correct? I've been reading articles and forum posts I've found on Google for the last couple of hours, and haven't found much that's relevant in regards to what I would like to accomplish. Any advise would be appreciated!
Posted over 5 years ago by