Closed beisert1 closed 10 years ago
I changed admin to is_admin and I added commas in between name, nickname, etc.
And I ran rake db:seed from console.
It didn't give me any errors or anything but my account still doesn't seem to be promoted to a administrator account.
You can do it through the rails console
rails console
s = Student.find_by_email("your@email")
s.admin = true
s.save
Thanks!
I am a bit confused on how to make a current user an admin.
I have the following code in my seeds.rb file: (in my actual code I have the name, nickname, email, and password of the account I have created and signed up on my site.)
Is there something I am missing or misspelling?
Original code used User instead of Student. Also should I change admin: true to is_admin: true since that is what I use on my site??