mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-04 06:36:27 +08:00
Fix shareable links association on user model [SCI-9200] (#6114)
This commit is contained in:
parent
0afe1d2946
commit
d63ec9f927
1 changed files with 4 additions and 1 deletions
|
@ -303,7 +303,10 @@ class User < ApplicationRecord
|
||||||
foreign_key: 'last_modified_by_id',
|
foreign_key: 'last_modified_by_id',
|
||||||
inverse_of: :last_modified_by,
|
inverse_of: :last_modified_by,
|
||||||
dependent: :nullify
|
dependent: :nullify
|
||||||
has_many :shareable_links, inverse_of: :created_by, dependent: :destroy
|
has_many :shareable_links,
|
||||||
|
foreign_key: 'created_by_id',
|
||||||
|
inverse_of: :created_by,
|
||||||
|
dependent: :destroy
|
||||||
|
|
||||||
has_many :user_notifications, inverse_of: :user
|
has_many :user_notifications, inverse_of: :user
|
||||||
has_many :notifications, through: :user_notifications
|
has_many :notifications, through: :user_notifications
|
||||||
|
|
Loading…
Reference in a new issue