Create Leads::GitlabCom::IterablesController
Summary
Create a new Leads::GitlabCom::IterablesController on CustomersDot to handle iterable lead creation for GitLab.com.
Problem
Iterable lead creation is currently handled in the monolithic trials_controller.rb via the create_iterable method. This needs to be extracted into a dedicated, REST-compliant controller.
Implementation Details
New Controller
File: app/controllers/leads/gitlab_com/iterables_controller.rb
Extract from trials_controller.rb
-
create_iterablemethod logic - Related validations and before_actions
- Iterable-specific error handling
- Any iterable-specific helper methods
Routes
Add to config/routes.rb:
namespace :leads do
namespace :gitlab_com do
resources :iterables, only: [:create]
end
end
New endpoint: POST /leads/gitlab_com/iterables
Edited by Doug Stull