On a rails app I'm working on I have authentication setup with devise. I have added an additional attribute the the user model called 'role'. It is simply an integer value which controls what exactly a user can do.
The issue I'm facing is I am not sure how exactly how to assign these roles safely. Obviously I can't just put a field in the sign up form for it. The safest way I can think of is to force the value to 0 on all accounts and when creating new admin accounts I would manually set it in the database, but this seems sloppy any ideas?