diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2019-01-15 22:05:36 +0100 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2019-03-11 21:44:22 +0100 |
commit | 3da8f4b90978a12ddbc282d5ec0be621d203f1b9 (patch) | |
tree | 48f49644020c07ce2dd1ffa30f8540db4eef228f /app/models/namespace.rb | |
parent | fcf632ef99fee06de42216e769ddfeb28967f17c (diff) | |
download | gitlab-ce-jlemaes/gitlab-ce-rails5.1.tar.gz |
Upgrade Rails to 5.1.6.1jlemaes/gitlab-ce-rails5.1
Model.new.attributes now also returns encrypted attributes.
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index a5c479bdc0c..b74c1729c3e 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -49,13 +49,15 @@ class Namespace < ApplicationRecord validate :nesting_level_allowed + validates_associated :runners + delegate :name, to: :owner, allow_nil: true, prefix: true after_commit :refresh_access_of_projects_invited_groups, on: :update, if: -> { previous_changes.key?('share_with_group_lock') } before_create :sync_share_with_group_lock_with_parent before_update :sync_share_with_group_lock_with_parent, if: :parent_changed? - after_update :force_share_with_group_lock_on_descendants, if: -> { share_with_group_lock_changed? && share_with_group_lock? } + after_update :force_share_with_group_lock_on_descendants, if: -> { saved_change_to_share_with_group_lock? && share_with_group_lock? } # Legacy Storage specific hooks @@ -270,7 +272,7 @@ class Namespace < ApplicationRecord private def path_or_parent_changed? - path_changed? || parent_changed? + saved_change_to_path? || saved_change_to_parent_id? end def refresh_access_of_projects_invited_groups |