diff --git a/app/controllers/identities_controller.rb b/app/controllers/identities_controller.rb index 14cd40e3..3ea84908 100644 --- a/app/controllers/identities_controller.rb +++ b/app/controllers/identities_controller.rb @@ -83,7 +83,7 @@ def create if age >= 19 && !@onboarding_scenario.accepts_adults track_event("signup.age_rejected", scenario: analytics_scenario, rejection_type: "too_old") - @age_restriction = "Hack Club is a community for teenagers.
Unfortunately, you are not eligible to join.".html_safe + @age_restriction = @onboarding_scenario.adult_ineligible_message @identity = Identity.new(@prefill_attributes.merge(attrs)) render :new, status: :unprocessable_entity return diff --git a/app/models/onboarding_scenarios/base.rb b/app/models/onboarding_scenarios/base.rb index 1f081506..9d2bbac4 100644 --- a/app/models/onboarding_scenarios/base.rb +++ b/app/models/onboarding_scenarios/base.rb @@ -37,6 +37,8 @@ def next_action = :home # Whether this scenario accepts adult (>18) users def accepts_adults = false + def adult_ineligible_message = "Hack Club is a community for teenagers.
Unfortunately, you are not eligible to join.".html_safe + # Whether this scenario accepts users under 13 def accepts_under13 = false