Skip to content

Instantly share code, notes, and snippets.

View tjhanley's full-sized avatar
🏒

Thomas Hanley tjhanley

🏒
View GitHub Profile
@tjhanley
tjhanley / referrer.rb
Created September 2, 2021 16:43
url slug
class Referrer < ActiveRecord::Base
URL_SLUG_REGEX = /^[a-z0-9-]+$/i
attr_accessible :token, :campaign, :campaign_id, :user_id, :lead_id
belongs_to :campaign
belongs_to :user
belongs_to :lead
has_many :referral_click_throughs