Class: Gold::ReferralsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Gold::ReferralsController
- Defined in:
- app/controllers/gold/referrals_controller.rb
Overview
Handles referral tracking
Instance Method Summary collapse
Instance Method Details
#track ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/controllers/gold/referrals_controller.rb', line 4 def track referral = Referral.find_by(code: params[:code]) [:gold_referral_id] = { value: referral.id, expires: 30.days } if referral redirect_to Gold.configuration.referral_redirect_url end |