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)
This commit is contained in:
@ -0,0 +1,5 @@
|
||||
class AddUserToCodeHarborLink < ActiveRecord::Migration
|
||||
def change
|
||||
add_reference :code_harbor_links, :user, index: true, foreign_key: true
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user