Files
codeocean/app/models/code_harbor_link.rb
leo.selig 68e74a9d85 Add association User has many CodeHarborLink
- 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)
2016-02-04 12:38:46 +01:00

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