feat: Create superadmin in seeds (#1442)

Create SuperAdmin in seeds scripts except on production
This commit is contained in:
Adam Zysko 2020-11-24 06:52:18 +01:00 committed by GitHub
parent 942d1fd0af
commit dffc888f9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,8 @@ user = User.new(name: 'John', email: 'john@acme.inc', password: '123456')
user.skip_confirmation! user.skip_confirmation!
user.save! user.save!
SuperAdmin.create!(email: 'john@acme.inc', password: '123456') unless Rails.env.production?
AccountUser.create!( AccountUser.create!(
account_id: account.id, account_id: account.id,
user_id: user.id, user_id: user.id,