Sha256: c3ae4b5b8f4d52d034dd0879df232edbf7095198edfe2b4efff3ccca09601be0

Contents?: true

Size: 695 Bytes

Versions: 17

Compression:

Stored size: 695 Bytes

Contents

module OpenStax
  module Accounts
    module Dev
      class AccountsCreate
        lev_handler

        paramify :create do
          attribute :username, type: String
          attribute :role, type: String
        end

        uses_routine OpenStax::Accounts::Dev::CreateAccount,
                     as: :create_account,
                     translations: { inputs: { scope: :create }, outputs: { type: :verbatim } }

        protected

        def authorized?
          !Rails.env.production? && OpenStax::Accounts.configuration.enable_stubbing?
        end

        def handle
          run(:create_account, create_params.as_hash(:username, :role))
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
openstax_accounts-9.9.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.8.1 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.8.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.7.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.6.1 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.6.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.5.1 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.5.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.4.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.3.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.0.5 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.0.4 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.2.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.0.3 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.1.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.0.2 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-9.0.1 app/handlers/openstax/accounts/dev/accounts_create.rb