Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/controllers/identities_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br/>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
Expand Down
2 changes: 2 additions & 0 deletions app/models/onboarding_scenarios/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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. <br/>Unfortunately, you are not eligible to join.".html_safe

# Whether this scenario accepts users under 13
def accepts_under13 = false

Expand Down