Skip to content

Commit

Permalink
Don't hardcode source_type as string
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Oct 8, 2024
1 parent b5d5453 commit e2786e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/redemption.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ class Redemption < ApplicationRecord
belongs_to :user
has_many :claims, dependent: :destroy
has_many :claimed_tutorials, through: :claims, source: :claimable,
source_type: "Tutorial"
source_type: Tutorial.name
has_many :claimed_talks, through: :claims, source: :claimable,
source_type: "Talk"
source_type: Talk.name

has_many :notifications, as: :notifiable, dependent: :destroy
end

0 comments on commit e2786e3

Please sign in to comment.