We've moved discussions to Discord

New users all defaulting to admin: true

Jack Riminton •
I can't work out how to set admin to false as a default for new users

Tried my own method in the User.rb model to work after_initialize: but no luck

Any suggestions Chris Oliver ?
Jack Riminton •
Also tried in User.rb:

attribute :admin, :boolean, default: false

which didn't work either
Jack Riminton •
Bump? Anyone?
Chris Oliver •
It's null by default which is falsey. Edit the migration if you want to make it explicit, but there's no need to.
Jack Riminton •
Many thanks
Notifications
You’re not receiving notifications from this thread.