Antony
1
After running an import seems that the script has given moderator privileges to half of the users.
I didn’t get a chance to see what DB structure looks like, so if someone would kindly help me adapt this
User.where(“is_moderator”).update_all(is_moderator: false)
Thanks
pfaffman
(Jay Pfaffman)
2
That’s pretty close… Maybe this is it?
User.where(moderator: true).update_all(moderator: false)
You can do something like
User.last
To see the properties.
2 Likes
Antony
3
Thanks, it did the trick
For anyone needing this, here is the full procedure.
./launcher enter app
# rails c
# User.where(moderator: true).update_all(moderator: false)
2 Likes