Skip to content

Instantly share code, notes, and snippets.

@babgyy
Last active March 21, 2023 09:33
Show Gist options
  • Save babgyy/1bec614f52c4127e1823ce2b280f1a41 to your computer and use it in GitHub Desktop.
Save babgyy/1bec614f52c4127e1823ce2b280f1a41 to your computer and use it in GitHub Desktop.
Create admin on prod
accounts = [
["[email protected]", SecureRandom.hex],
["[email protected]", SecureRandom.hex],
]
role = Spree::Role.first
accounts.each do |account|
email, password = account
user = Spree::User.create(email: email, password: password)
role.users << user
puts "User #{email} - Password #{password}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment