can you please let me know how to pass values dat are not taken as input to user to db.The below are the details.
I have a model user (name:string email:string password:string role:string).
Now I dont want to take role from user.My view (html) does not contain input colum role.(the default role is normaluser).I want to assign it when the following conditions occur
if admin is creating the user the i have to assign moderator role to the user being created. I can check whos logged in now with say
current_user.admin?But how do i assign the moderator role to user role attribute