One Partial, Two Rails Apps
The tour-immigration page lives on both loadout.ca and TourChamp. Here's how we kept them identical, and the test that makes sure no real client names ever leak onto it.
The tour-immigration pitch has two homes: loadout.ca/tour-immigration and the public front of tourchamp.loadout.ca. Same headline, same sample board, same FAQ.
Two copies of a marketing page drift. Someone fixes a typo on one and not the other, and six months later they say different things about what you do. So we built it once.
The partial
The whole page is a single ERB partial, _tour_immigration.html.erb, rendered identically in both apps. Its styles live inside it and are namespaced under a .ti- prefix, so it doesn't care what each app's layout or CSS framework is doing around it. The one thing that differs between the two apps, where the "Tell us about your tour" button goes, comes in from each app as cta_href instead of being branched on inside the partial.
On loadout.ca, that button goes to an enquiry form at the bottom of the page. Submissions save as both an Inquiry and a Lead, tagged tour-immigration, so they land in the same pipeline as every other enquiry. The page is in the footer and the sitemap.
Designed like paperwork
The page is themed on the documents it's about: passport-stamp greens, paper backgrounds, ink-dark bands. A few choices that came from the content rather than a template:
- "What we handle" is a ruled list, not cards. Seven items read like a checklist, so they look like one.
- "How it runs" is numbered, because it's an actual sequence. Things that aren't a sequence don't get numbers.
- The FAQ uses
<details>, so it works without JavaScript.
The test that guards the sample data
The page shows a sample crew readiness board. It's tempting, when you have a real app full of real tours, to screenshot something real and blur it. We didn't. Every row is invented.
And because "we'll remember not to" isn't a policy, both apps have an integration test that renders the page and asserts that no client, artist or promoter name from the app's data appears anywhere in the HTML. If someone later "improves" the sample with a real tour, the build goes red before it goes live.
It's a small test. It's also the one I'd least like to be without.
FREE Shopify Product Migration
Moving to Shopify? We'll migrate your product catalog for free. New stores only.