Skip to content

Commit

Permalink
Don't redundantly specify foreign_keys (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
northeastprince authored Nov 5, 2023
1 parent 1c02c0e commit b71832c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ class User < ApplicationRecord
include Named
include Privileged # depends on Eventable

has_many :subscriptions, class_name: "Hackathon::Subscription", foreign_key: "subscriber_id", inverse_of: :subscriber, dependent: :destroy
has_many :digests, class_name: "Hackathon::Digest", foreign_key: "recipient_id", inverse_of: :recipient, dependent: :destroy
has_many :subscriptions, class_name: "Hackathon::Subscription", inverse_of: :subscriber, dependent: :destroy
has_many :digests, class_name: "Hackathon::Digest", inverse_of: :recipient, dependent: :destroy
end

0 comments on commit b71832c

Please sign in to comment.