Sha256: ab0c3d9eb7591a42f936bdec90d7b989e6528145577e5c84b47ddb0fe188cf71

Contents?: true

Size: 701 Bytes

Versions: 23

Compression:

Stored size: 701 Bytes

Contents

module EgovUtils
  module RegistrationRequests
    class Create < ActiveInteraction::Base
      string :mail
      string :firstname
      string :lastname
      string :organization
      string :note
      string :supervisor_name
      string :supervisor_phone
      string :supervisor_email
      string :supervisor_assignment

      def execute
        request = RegistrationRequest.create(inputs.merge(status: :pending))

        if request.persisted?
          EgovUtils::RegistrationRequestMailer.created(request.id).deliver_now
          CheckAutoAcceptJob.perform_async(request.id)
        else
          errors.merge!(request.errors)
        end

        request
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
egov_utils-1.5.0.alpha16 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha15 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha14 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha13 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha12 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha11 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha10 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha9 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha8 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha7 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha6 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha5 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha4 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.4.5 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.4.4 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha3 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha2 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.5.0.alpha1 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.4.3 app/services/egov_utils/registration_requests/create.rb
egov_utils-1.4.2 app/services/egov_utils/registration_requests/create.rb