Sha256: 60565c596c26e3de52a5fdd541060f12b4b4970ec01cf009c94d782f8305a794

Contents?: true

Size: 735 Bytes

Versions: 34

Compression:

Stored size: 735 Bytes

Contents

module OpenStax
  module Accounts

    module Dev
      class AccountsCreate

        lev_handler

        paramify :create do
          attribute :username, type: String
          validates :username, presence: true
        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))
        end

      end 
    end

  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
openstax_accounts-7.5.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-7.4.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-7.3.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-7.2.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-7.1.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-7.0.1 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-7.0.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.4.2 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.4.1 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.4.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.3.2 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.3.1 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.3.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.2.0 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.1.7 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.1.6 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.1.5 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.1.4 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.1.3 app/handlers/openstax/accounts/dev/accounts_create.rb
openstax_accounts-6.1.2 app/handlers/openstax/accounts/dev/accounts_create.rb