Im working on a simple rails project were users have an attribute called is_admin, and the is_admin cannot be assigned through mass asignment(atr_assecsible). The problem here is, i want to create a default user with the value is_admin => true and i do not no if it would be possible from the migration file because of the protected attribute(:is_admin). so that wen i run rake rails:setup it creates the migrations and the default admin user.
Im working on a simple rails project were users have an attribute called is_admin,
Share
To my knowledge, migrations don’t use mass assignment. I don’t see why you would have an issue doing this.