Fix wrong belongs_to :user
- because of polymorphic user model this didn't work - changed to :internal_user because that's anyway the only type of user we want to impoprt from (leoselig/codeocean#1)
This commit is contained in:
@ -2,7 +2,9 @@ class CodeHarborLink < ActiveRecord::Base
|
|||||||
validates :oauth2token, presence: true
|
validates :oauth2token, presence: true
|
||||||
validates :user_id, presence: true
|
validates :user_id, presence: true
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :internal_user, foreign_key: :user_id
|
||||||
|
alias_method :user, :internal_user
|
||||||
|
alias_method :user=, :internal_user=
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
oauth2token
|
oauth2token
|
||||||
|
Reference in New Issue
Block a user