summaryrefslogtreecommitdiff
path: root/app/experiments/combined_registration_experiment.rb
blob: da699449d7757f01b56d6266f911fed666186982 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

class CombinedRegistrationExperiment < ApplicationExperiment # rubocop:disable Gitlab/NamespacedClass
  include Rails.application.routes.url_helpers

  def key_for(source, _ = nil)
    super(source, 'force_company_trial')
  end

  def redirect_path(trial_params)
    @trial_params = trial_params

    run
  end

  def control_behavior
    new_users_sign_up_group_path(@trial_params)
  end

  def candidate_behavior
    new_users_sign_up_groups_project_path
  end
end