Gate training-only ticket callouts to facilitator trainings#1945
Conversation
The built-in Handouts, FAQ, and Forms callouts always rendered on every registration ticket, but their content is written for the 2-Day AWBW Facilitator Training (training worksheets, "2-day training" FAQ). Public, non-training events — including live ones with no registration process — were showing these irrelevant training callouts to registrants. Gate them on facilitator_training? (Handouts, FAQ) plus any paid event (Forms, whose registrants still need their invoice/receipt), and redirect the corresponding callout pages when hidden. This corrects every live event with no migration, since facilitator_training already partitions the data. A follow-up PR adds per-event overrides so admins can force each callout on or off from the event's callouts section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| facilitator_training? | ||
| end | ||
|
|
||
| def show_forms_callout? |
There was a problem hiding this comment.
🤖 From Claude: Forms is gated on facilitator_training? || paid rather than training-only: the Forms page carries the invoice and paid-in-full receipt, which any paying registrant needs. Handouts/FAQ are pure training curriculum, so those stay training-only.
| # FAQ for the training, with a folded-in contact link. Only reachable when | ||
| # the event shows the FAQ callout. | ||
| def faq | ||
| redirect_to registration_ticket_path(@event_registration.slug) unless @event.show_faq_callout? |
There was a problem hiding this comment.
🤖 From Claude: These pages are reachable by slug (no auth), so hiding the card is not enough — a shared/stale link would still surface training content on a non-training event. The redirect mirrors how certificate/scholarship guard their unavailable states.
|
@jmilljr24 this keeps the hard-coded cards hard-coded. there's a world we might want to consider where these become populated data at time of event creation or opt-in to the event, but, this gets them turned off for rn while we talk through options. |
🤖 suggested review level: 3 Read 📖 small, contained visibility guards on built-in ticket callouts + spec updates
What is the goal of this PR and why is this important?
How did you approach the change?
Event#show_handouts_callout?/#show_faq_callout?(→facilitator_training?) and#show_forms_callout?(→facilitator_training?or paid, since paying registrants still need their invoice/receipt).MagicTicketCalloutsnow returns those cards only when the predicate holds; the callout pages (forms/handouts/faq) redirect to the ticket when hidden.facilitator_trainingalready partitions live data correctly, so this corrects every live event on deploy.Anything else to add?