codetriage / CodeTriage

Discover the best way to get started contributing to Open Source projects
https://www.codetriage.com
MIT License
1.38k stars 359 forks source link

Missing RepoAssignment model or incorrect association in User model #1780

Open baxter2 opened 1 year ago

baxter2 commented 1 year ago

I noticed an association in the User model that seems to reference a missing model called RepoAssignment:

# app/models/user.rb
class User
  has_many :repo_assignments, through: :repo_subscriptions

which was introduced back in this commit https://github.com/codetriage/CodeTriage/blob/190f3154c0aea294b538aa308efbfc063d119a34/app/models/user.rb#L14

I think User model was originally intended to have a has_many :doc_assignments, through: :repo_subscriptions association instead of has_many :repo_assignments, through: :repo_subscriptions?

However even if it was changed to has_many :doc_assignments that association ins't necessary in the app currently. So might be best to just delete it in the first place?