We recently implemented a referral system in Rails using the Refer gem! It's great for growing your user base!

Was as easy as:
1️⃣ Add the gem
2️⃣ Generate migrations
3️⃣ Customize referral code generation