mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-09 06:35:37 +08:00
Merge pull request #8749 from artoscinote/ma_SCI_12204
Add team and user_group assignment relations [SCI-12204]
This commit is contained in:
commit
d0e0fc7523
2 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,7 @@ class Team < ApplicationRecord
|
|||
has_many :shareable_links, inverse_of: :team, dependent: :destroy
|
||||
has_many :storage_locations, dependent: :destroy
|
||||
has_many :forms, dependent: :destroy
|
||||
has_many :team_assignments, dependent: :destroy
|
||||
|
||||
attr_accessor :without_templates
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ class UserGroup < ApplicationRecord
|
|||
belongs_to :last_modified_by, class_name: 'User', optional: true
|
||||
has_many :user_group_memberships, dependent: :destroy
|
||||
has_many :users, through: :user_group_memberships, dependent: :destroy
|
||||
has_many :user_group_assignments, dependent: :destroy
|
||||
|
||||
accepts_nested_attributes_for :user_group_memberships
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue