Sha256: ba68a9b93752cbf4c5c966bfd2798abae4a328ae131e10e7a6f8b8336a265172

Contents?: true

Size: 607 Bytes

Versions: 21

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

module NeetoCommonsBackend
  module SampleData
    module Common
      class AdminService < Common::Base
        def process!
          create_admin!
        end

        private

          def create_admin!
            User.create! \
              organization:,
              email: "oliver@example.com",
              first_name: "Oliver",
              last_name: "Smith",
              active: true,
              password: app_secrets.default_password,
              organization_role: organization.roles.find_by(name: "Admin")
          end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.109 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.108 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.107 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.106 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.105 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.104 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.103 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.102 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.101 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.100 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.99 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.98 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.97 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.96 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.95 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.94 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.93 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.92 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.91 app/services/neeto_commons_backend/sample_data/common/admin_service.rb
neeto-commons-backend-1.0.90 app/services/neeto_commons_backend/sample_data/common/admin_service.rb