Adjust user creation syntax

#skip_confirmation! can't be chained...
This commit is contained in:
Matt-Yorkley
2019-08-14 09:22:11 +01:00
parent 8c95399292
commit d8a7190f43

View File

@@ -56,7 +56,8 @@ def create_admin_user
say "\nWARNING: There is already a user with the email: #{email}, so no account changes were made. If you wish to create an additional admin user, please run rake spree_auth:admin:create again with a different email.\n\n"
else
admin = Spree::User.new(attributes)
admin.skip_confirmation!.skip_confirmation_notification!
admin.skip_confirmation!
admin.skip_confirmation_notification!
if admin.save
role = Spree::Role.find_or_create_by_name 'admin'
admin.spree_roles << role