Reputation: 244
Right now when I change User.first.admin = false, to User.first.admin = true it does not save. Even if I run User.first.save afterwards. While if I make
variable = User.first
variable.admin = true
variable.admin
it will return true(default is false)
But the user in my actual application is still not given the extra features they would be if admin = true, so how do I properly set admin to true for my first User in the rails console(with pry) ? Thanks for the help.
Upvotes: 3
Views: 3079
Reputation: 11
Alternatively, after variable.admin = true, you can just run
variable.save
Upvotes: 1