[go: up one dir, main page]

Create Leads::GitlabCom::UltimatesController

Summary

Create a new Leads::GitlabCom::UltimatesController on CustomersDot to handle trial-related lead creation for GitLab.com.

Problem

The trials_controller.rb#create method currently handles both lead creation and trial application. This needs to be separated - this issue extracts the lead creation portion into a dedicated controller.

Implementation Details

New Controller

File: app/controllers/leads/gitlab_com/ultimates_controller.rb

Responsibilities:

  • Handle trial-related lead creation for GitLab.com users
  • Validate lead parameters
  • Integrate with lead tracking systems (Marketo, Salesforce, etc.)
  • Return appropriate success/error responses

Extract from trials_controller.rb

  • Lead creation logic from create method
  • Related validations for lead data
  • Lead-specific error handling
  • Any lead-specific helper methods

Important: Do NOT extract trial application logic - that stays in trials_controller.rb#create and will be moved by another epic.

Routes

Add to config/routes.rb:

namespace :leads do
  namespace :gitlab_com do
    resources :ultimates, only: [:create]
  end
end

New endpoint: POST /leads/gitlab_com/ultimates

Edited by Doug Stull