mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-02 05:02:18 +08:00
Touch parent folder of folder
This commit is contained in:
parent
e88848cd75
commit
996f604df1
2 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ class Project < ApplicationRecord
|
|||
class_name: 'User',
|
||||
optional: true
|
||||
belongs_to :team, inverse_of: :projects, touch: true
|
||||
belongs_to :project_folder, inverse_of: :projects, optional: true
|
||||
belongs_to :project_folder, inverse_of: :projects, optional: true, touch: true
|
||||
has_many :user_projects, inverse_of: :project
|
||||
has_many :users, through: :user_projects
|
||||
has_many :experiments, inverse_of: :project
|
||||
|
|
|
@ -16,7 +16,7 @@ class ProjectFolder < ApplicationRecord
|
|||
before_validation :ensure_uniqueness_name_on_moving, on: :update, if: -> { parent_folder_id_changed? }
|
||||
|
||||
belongs_to :team, inverse_of: :project_folders, touch: true
|
||||
belongs_to :parent_folder, class_name: 'ProjectFolder', optional: true
|
||||
belongs_to :parent_folder, class_name: 'ProjectFolder', optional: true, touch: true
|
||||
belongs_to :archived_by, foreign_key: 'archived_by_id',
|
||||
class_name: 'User',
|
||||
inverse_of: :archived_project_folders,
|
||||
|
|
Loading…
Reference in a new issue