
- add migration tht associates User with CodeHarborLink - add belongs_to from CodeHarborLink to User - changed CodeHarborLinkController#index to only serve current user's CodeHarborLinks (leoselig/codeocean#2)
12 lines
179 B
Ruby
12 lines
179 B
Ruby
class CodeHarborLink < ActiveRecord::Base
|
|
validates :oauth2token, presence: true
|
|
validates :user_id, presence: true
|
|
|
|
belongs_to :user
|
|
|
|
def to_s
|
|
oauth2token
|
|
end
|
|
|
|
end
|